mbox

arm: at91: mach header cleanup

Message ID 20121107111235.GH20063@game.jcrosoft.org
State New
Headers show

Pull-request

git://github.com/at91linux/linux-at91.git tags/for-3.8-at91_header_clean

Message

Jean-Christophe PLAGNIOL-VILLARD Nov. 7, 2012, 11:12 a.m. UTC
Hi,

The following changes since commit 8f0d8163b50e01f398b14bcd4dc039ac5ab18d64:

  Linux 3.7-rc3 (2012-10-28 12:24:48 -0700)

are available in the git repository at:

  git://github.com/at91linux/linux-at91.git tags/for-3.8-at91_header_clean

for you to fetch changes up to 75984df05d86956541795f01e62d7dc67bc522fd:

  arm: at91: move at91rm9200 rtc header in drivers/rtc (2012-11-06 20:30:52 +0800)

----------------------------------------------------------------
arm: at91: mach header cleanup

This first patch serie start the cleanup of the header in mach
by moving all the platform data to include/linux/platform_data

and move the board header and drivers header next to them

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Cc: Nicolas Ferre <nicolas.ferre@atmel.com>

----------------------------------------------------------------
Jean-Christophe PLAGNIOL-VILLARD (10):
      arm: at91: drop machine defconfig
      arm: at91: move platfarm_data to include/linux/platform_data/atmel.h
      arm: at91 move board.h to arch/arm/mach-at91
      arm: at91 move at91_aic.h to arch/arm/mach-at91
      arn: at91: move at91_tc.h to arch/arm/mach-at91
      arm: at91: move board header to arch/arm/mach-at91
      arm: at91: move at91_shdwc.h to arch/arm/mach-at91
      arm: at91: move pit define to the driver
      arm: at91: move reset controller header to arm/arm/mach-at91
      arm: at91: move at91rm9200 rtc header in drivers/rtc

 arch/arm/configs/afeb9260_defconfig                                        |  106 ------------------------------
 arch/arm/configs/cam60_defconfig                                           |  173 -------------------------------------------------
 arch/arm/configs/cpu9260_defconfig                                         |  116 ---------------------------------
 arch/arm/configs/cpu9g20_defconfig                                         |  116 ---------------------------------
 arch/arm/configs/qil-a9260_defconfig                                       |  114 --------------------------------
 arch/arm/configs/sam9_l9260_defconfig                                      |  148 ------------------------------------------
 arch/arm/configs/stamp9g20_defconfig                                       |  128 ------------------------------------
 arch/arm/configs/usb-a9260_defconfig                                       |  105 ------------------------------
 arch/arm/mach-at91/{include/mach => }/at91_aic.h                           |    0
 arch/arm/mach-at91/{include/mach => }/at91_rstc.h                          |    0
 arch/arm/mach-at91/{include/mach => }/at91_shdwc.h                         |    0
 arch/arm/mach-at91/{include/mach => }/at91_tc.h                            |    0
 arch/arm/mach-at91/at91rm9200.c                                            |    2 +-
 arch/arm/mach-at91/at91rm9200_devices.c                                    |    2 +-
 arch/arm/mach-at91/at91sam9260.c                                           |    4 +-
 arch/arm/mach-at91/at91sam9260_devices.c                                   |    2 +-
 arch/arm/mach-at91/at91sam9261.c                                           |    4 +-
 arch/arm/mach-at91/at91sam9261_devices.c                                   |    2 +-
 arch/arm/mach-at91/at91sam9263.c                                           |    4 +-
 arch/arm/mach-at91/at91sam9263_devices.c                                   |    2 +-
 arch/arm/mach-at91/at91sam926x_time.c                                      |   14 +++-
 arch/arm/mach-at91/at91sam9_alt_reset.S                                    |    2 +-
 arch/arm/mach-at91/at91sam9g45.c                                           |    2 +-
 arch/arm/mach-at91/at91sam9g45_devices.c                                   |    2 +-
 arch/arm/mach-at91/at91sam9g45_reset.S                                     |    3 +-
 arch/arm/mach-at91/at91sam9n12.c                                           |    2 +-
 arch/arm/mach-at91/at91sam9rl.c                                            |    4 +-
 arch/arm/mach-at91/at91sam9rl_devices.c                                    |    2 +-
 arch/arm/mach-at91/at91sam9x5.c                                            |    2 +-
 arch/arm/mach-at91/at91x40.c                                               |    3 +-
 arch/arm/mach-at91/at91x40_time.c                                          |    3 +-
 arch/arm/mach-at91/board-1arm.c                                            |    4 +-
 arch/arm/mach-at91/board-afeb-9260v1.c                                     |    5 +-
 arch/arm/mach-at91/board-cam60.c                                           |    4 +-
 arch/arm/mach-at91/board-carmeva.c                                         |    4 +-
 arch/arm/mach-at91/board-cpu9krea.c                                        |    4 +-
 arch/arm/mach-at91/board-cpuat91.c                                         |    4 +-
 arch/arm/mach-at91/board-csb337.c                                          |    4 +-
 arch/arm/mach-at91/board-csb637.c                                          |    4 +-
 arch/arm/mach-at91/board-dt.c                                              |    5 +-
 arch/arm/mach-at91/board-eb01.c                                            |    5 +-
 arch/arm/mach-at91/board-eb9200.c                                          |    5 +-
 arch/arm/mach-at91/board-ecbat91.c                                         |    4 +-
 arch/arm/mach-at91/board-eco920.c                                          |    4 +-
 arch/arm/mach-at91/board-flexibity.c                                       |    4 +-
 arch/arm/mach-at91/board-foxg20.c                                          |    4 +-
 arch/arm/mach-at91/board-gsia18s.c                                         |    8 +--
 arch/arm/mach-at91/board-kafa.c                                            |    4 +-
 arch/arm/mach-at91/board-kb9202.c                                          |    4 +-
 arch/arm/mach-at91/board-neocore926.c                                      |    4 +-
 arch/arm/mach-at91/board-pcontrol-g20.c                                    |    6 +-
 arch/arm/mach-at91/board-picotux200.c                                      |    4 +-
 arch/arm/mach-at91/board-qil-a9260.c                                       |    6 +-
 arch/arm/mach-at91/board-rm9200dk.c                                        |    4 +-
 arch/arm/mach-at91/board-rm9200ek.c                                        |    4 +-
 arch/arm/mach-at91/board-rsi-ews.c                                         |    4 +-
 arch/arm/mach-at91/board-sam9-l9260.c                                      |    4 +-
 arch/arm/mach-at91/board-sam9260ek.c                                       |    6 +-
 arch/arm/mach-at91/board-sam9261ek.c                                       |    6 +-
 arch/arm/mach-at91/board-sam9263ek.c                                       |    6 +-
 arch/arm/mach-at91/board-sam9g20ek.c                                       |    4 +-
 arch/arm/mach-at91/board-sam9m10g45ek.c                                    |    6 +-
 arch/arm/mach-at91/board-sam9rlek.c                                        |    7 +-
 arch/arm/mach-at91/board-snapper9260.c                                     |    4 +-
 arch/arm/mach-at91/board-stamp9g20.c                                       |    4 +-
 arch/arm/mach-at91/board-usb-a926x.c                                       |    6 +-
 arch/arm/mach-at91/board-yl-9200.c                                         |    4 +-
 arch/arm/mach-at91/{include/mach => }/board.h                              |   55 ----------------
 arch/arm/mach-at91/{include/mach => }/gsia18s.h                            |    0
 arch/arm/mach-at91/include/mach/at91_pit.h                                 |   32 ---------
 arch/arm/mach-at91/irq.c                                                   |    2 +-
 arch/arm/mach-at91/leds.c                                                  |    2 +-
 arch/arm/mach-at91/pm.c                                                    |    6 +-
 arch/arm/mach-at91/setup.c                                                 |    2 +-
 arch/arm/mach-at91/{include/mach => }/stamp9g20.h                          |    0
 arch/avr32/mach-at32ap/include/mach/board.h                                |    7 --
 drivers/ata/pata_at91.c                                                    |    2 +-
 drivers/input/touchscreen/atmel_tsadcc.c                                   |    2 +-
 drivers/mmc/host/atmel-mci.c                                               |    2 +-
 drivers/net/can/at91_can.c                                                 |    3 +-
 drivers/net/ethernet/cadence/at91_ether.c                                  |    2 +-
 drivers/pcmcia/at91_cf.c                                                   |    2 +-
 drivers/rtc/rtc-at91rm9200.c                                               |    2 +-
 arch/arm/mach-at91/include/mach/at91_rtc.h => drivers/rtc/rtc-at91rm9200.h |    0
 drivers/rtc/rtc-at91sam9.c                                                 |    2 +-
 drivers/spi/spi-atmel.c                                                    |    2 +-
 drivers/tty/serial/atmel_serial.c                                          |    2 +-
 drivers/usb/gadget/at91_udc.c                                              |    2 +-
 drivers/usb/gadget/atmel_usba_udc.c                                        |    2 +-
 drivers/usb/host/ohci-at91.c                                               |    2 +-
 drivers/video/atmel_lcdfb.c                                                |    2 +-
 include/linux/platform_data/atmel.h                                        |   67 +++++++++++++++++++
 92 files changed, 207 insertions(+), 1231 deletions(-)
 delete mode 100644 arch/arm/configs/afeb9260_defconfig
 delete mode 100644 arch/arm/configs/cam60_defconfig
 delete mode 100644 arch/arm/configs/cpu9260_defconfig
 delete mode 100644 arch/arm/configs/cpu9g20_defconfig
 delete mode 100644 arch/arm/configs/qil-a9260_defconfig
 delete mode 100644 arch/arm/configs/sam9_l9260_defconfig
 delete mode 100644 arch/arm/configs/stamp9g20_defconfig
 delete mode 100644 arch/arm/configs/usb-a9260_defconfig
 rename arch/arm/mach-at91/{include/mach => }/at91_aic.h (100%)
 rename arch/arm/mach-at91/{include/mach => }/at91_rstc.h (100%)
 rename arch/arm/mach-at91/{include/mach => }/at91_shdwc.h (100%)
 rename arch/arm/mach-at91/{include/mach => }/at91_tc.h (100%)
 rename arch/arm/mach-at91/{include/mach => }/board.h (71%)
 rename arch/arm/mach-at91/{include/mach => }/gsia18s.h (100%)
 delete mode 100644 arch/arm/mach-at91/include/mach/at91_pit.h
 rename arch/arm/mach-at91/{include/mach => }/stamp9g20.h (100%)
 rename arch/arm/mach-at91/include/mach/at91_rtc.h => drivers/rtc/rtc-at91rm9200.h (100%)

Best Regards,
J.

Comments

Marc Kleine-Budde Nov. 7, 2012, 12:20 p.m. UTC | #1
On 11/07/2012 12:22 PM, Jean-Christophe PLAGNIOL-VILLARD wrote:
> Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
> Cc: Nicolas Ferre <nicolas.ferre@atmel.com>
> Cc: linux-ide@vger.kernel.org
> Cc: linux-input@vger.kernel.org
> Cc: linux-mmc@vger.kernel.org
> Cc: linux-can@vger.kernel.org
> Cc: netdev@vger.kernel.org
> Cc: linux-pcmcia@lists.infradead.org
> Cc: rtc-linux@googlegroups.com
> Cc: spi-devel-general@lists.sourceforge.net
> Cc: linux-serial@vger.kernel.org
> Cc: linux-usb@vger.kernel.org
> Cc: linux-fbdev@vger.kernel.org
> ---
> HI all,
> 
> 	If it's ok with everyone this will go via at91
> 	with the patch serie than clean up the include/mach

Fine with me.

> 	For preparation to switch to arm multiarch kernel

Acked-by: Marc Kleine-Budde <mkl@pengutronix.de> (for the CAN related changes)

Marc
Dmitry Torokhov Nov. 10, 2012, 8:42 a.m. UTC | #2
On Wed, Nov 07, 2012 at 01:20:41PM +0100, Marc Kleine-Budde wrote:
> On 11/07/2012 12:22 PM, Jean-Christophe PLAGNIOL-VILLARD wrote:
> > Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
> > Cc: Nicolas Ferre <nicolas.ferre@atmel.com>
> > Cc: linux-ide@vger.kernel.org
> > Cc: linux-input@vger.kernel.org
> > Cc: linux-mmc@vger.kernel.org
> > Cc: linux-can@vger.kernel.org
> > Cc: netdev@vger.kernel.org
> > Cc: linux-pcmcia@lists.infradead.org
> > Cc: rtc-linux@googlegroups.com
> > Cc: spi-devel-general@lists.sourceforge.net
> > Cc: linux-serial@vger.kernel.org
> > Cc: linux-usb@vger.kernel.org
> > Cc: linux-fbdev@vger.kernel.org
> > ---
> > HI all,
> > 
> > 	If it's ok with everyone this will go via at91
> > 	with the patch serie than clean up the include/mach
> 
> Fine with me.
> 
> > 	For preparation to switch to arm multiarch kernel
> 
> Acked-by: Marc Kleine-Budde <mkl@pengutronix.de> (for the CAN related changes)

Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>

for input piece.
Joachim Eastwood Nov. 10, 2012, 10:54 a.m. UTC | #3
Hi Jean-Christophe,

On 7 November 2012 12:22, Jean-Christophe PLAGNIOL-VILLARD
<plagnioj@jcrosoft.com> wrote:
> Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
> Cc: Nicolas Ferre <nicolas.ferre@atmel.com>
> Cc: linux-ide@vger.kernel.org
> Cc: linux-input@vger.kernel.org
> Cc: linux-mmc@vger.kernel.org
> Cc: linux-can@vger.kernel.org
> Cc: netdev@vger.kernel.org
> Cc: linux-pcmcia@lists.infradead.org
> Cc: rtc-linux@googlegroups.com
> Cc: spi-devel-general@lists.sourceforge.net
> Cc: linux-serial@vger.kernel.org
> Cc: linux-usb@vger.kernel.org
> Cc: linux-fbdev@vger.kernel.org
> ---
> HI all,
>
>         If it's ok with everyone this will go via at91
>         with the patch serie than clean up the include/mach
>
>         For preparation to switch to arm multiarch kernel
>
> Best Regards,
> J.
>  arch/arm/mach-at91/include/mach/board.h     |   55 ----------------------
>  arch/avr32/mach-at32ap/include/mach/board.h |    7 ---
>  drivers/ata/pata_at91.c                     |    2 +-
>  drivers/input/touchscreen/atmel_tsadcc.c    |    2 +-
>  drivers/mmc/host/atmel-mci.c                |    2 +-
>  drivers/net/can/at91_can.c                  |    3 +-
>  drivers/net/ethernet/cadence/at91_ether.c   |    2 +-
>  drivers/pcmcia/at91_cf.c                    |    2 +-
>  drivers/rtc/rtc-at91sam9.c                  |    2 +-
>  drivers/spi/spi-atmel.c                     |    2 +-
>  drivers/tty/serial/atmel_serial.c           |    2 +-
>  drivers/usb/gadget/at91_udc.c               |    2 +-
>  drivers/usb/gadget/atmel_usba_udc.c         |    2 +-
>  drivers/usb/host/ohci-at91.c                |    2 +-
>  drivers/video/atmel_lcdfb.c                 |    2 +-
>  include/linux/platform_data/atmel.h         |   67 +++++++++++++++++++++++++++
>  16 files changed, 80 insertions(+), 76 deletions(-)

<snip>

> diff --git a/drivers/net/ethernet/cadence/at91_ether.c b/drivers/net/ethernet/cadence/at91_ether.c
> index 4e980a7..35fc6edb 100644
> --- a/drivers/net/ethernet/cadence/at91_ether.c
> +++ b/drivers/net/ethernet/cadence/at91_ether.c
> @@ -31,6 +31,7 @@
>  #include <linux/clk.h>
>  #include <linux/gfp.h>
>  #include <linux/phy.h>
> +#include <linux/platform_data/atmel.h>
>
>  #include <asm/io.h>
>  #include <asm/uaccess.h>
> @@ -38,7 +39,6 @@
>
>  #include <mach/at91rm9200_emac.h>
>  #include <asm/gpio.h>
> -#include <mach/board.h>
>
>  #include "at91_ether.h"

The at91_ether driver in net-next does not need to be change since it
all mach includes has already been removed by other patches and it
includes linux/platform_data/macb.h directly.

What tree was these patches based on?
The at91_ether driver changes has been in linux-next for a long while now.

regards
Joachim Eastwood
Nicolas Ferre Nov. 12, 2012, 10:57 a.m. UTC | #4
Hi,

Beware: subject has typo: s/arn/ARM/
Also, care about capital letters for "ARM" => to all patches of the series.

Bye,


On 11/07/2012 12:22 PM, Jean-Christophe PLAGNIOL-VILLARD :
> Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
> Cc: Nicolas Ferre <nicolas.ferre@atmel.com>
> ---
>  arch/arm/mach-at91/{include/mach => }/at91_tc.h |    0
>  arch/arm/mach-at91/at91x40_time.c               |    3 ++-
>  2 files changed, 2 insertions(+), 1 deletion(-)
>  rename arch/arm/mach-at91/{include/mach => }/at91_tc.h (100%)
> 
> diff --git a/arch/arm/mach-at91/include/mach/at91_tc.h b/arch/arm/mach-at91/at91_tc.h
> similarity index 100%
> rename from arch/arm/mach-at91/include/mach/at91_tc.h
> rename to arch/arm/mach-at91/at91_tc.h
> diff --git a/arch/arm/mach-at91/at91x40_time.c b/arch/arm/mach-at91/at91x40_time.c
> index ee06d7b..0e57e44 100644
> --- a/arch/arm/mach-at91/at91x40_time.c
> +++ b/arch/arm/mach-at91/at91x40_time.c
> @@ -26,7 +26,8 @@
>  #include <linux/io.h>
>  #include <mach/hardware.h>
>  #include <asm/mach/time.h>
> -#include <mach/at91_tc.h>
> +
> +#include "at91_tc.h"
>  
>  #define at91_tc_read(field) \
>  	__raw_readl(AT91_IO_P2V(AT91_TC) + field)
>
Jean-Christophe PLAGNIOL-VILLARD Nov. 12, 2012, 2:06 p.m. UTC | #5
On 11:54 Sat 10 Nov     , Joachim Eastwood wrote:
> Hi Jean-Christophe,
> 
> On 7 November 2012 12:22, Jean-Christophe PLAGNIOL-VILLARD
> <plagnioj@jcrosoft.com> wrote:
> > Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
> > Cc: Nicolas Ferre <nicolas.ferre@atmel.com>
> > Cc: linux-ide@vger.kernel.org
> > Cc: linux-input@vger.kernel.org
> > Cc: linux-mmc@vger.kernel.org
> > Cc: linux-can@vger.kernel.org
> > Cc: netdev@vger.kernel.org
> > Cc: linux-pcmcia@lists.infradead.org
> > Cc: rtc-linux@googlegroups.com
> > Cc: spi-devel-general@lists.sourceforge.net
> > Cc: linux-serial@vger.kernel.org
> > Cc: linux-usb@vger.kernel.org
> > Cc: linux-fbdev@vger.kernel.org
> > ---
> > HI all,
> >
> >         If it's ok with everyone this will go via at91
> >         with the patch serie than clean up the include/mach
> >
> >         For preparation to switch to arm multiarch kernel
> >
> > Best Regards,
> > J.
> >  arch/arm/mach-at91/include/mach/board.h     |   55 ----------------------
> >  arch/avr32/mach-at32ap/include/mach/board.h |    7 ---
> >  drivers/ata/pata_at91.c                     |    2 +-
> >  drivers/input/touchscreen/atmel_tsadcc.c    |    2 +-
> >  drivers/mmc/host/atmel-mci.c                |    2 +-
> >  drivers/net/can/at91_can.c                  |    3 +-
> >  drivers/net/ethernet/cadence/at91_ether.c   |    2 +-
> >  drivers/pcmcia/at91_cf.c                    |    2 +-
> >  drivers/rtc/rtc-at91sam9.c                  |    2 +-
> >  drivers/spi/spi-atmel.c                     |    2 +-
> >  drivers/tty/serial/atmel_serial.c           |    2 +-
> >  drivers/usb/gadget/at91_udc.c               |    2 +-
> >  drivers/usb/gadget/atmel_usba_udc.c         |    2 +-
> >  drivers/usb/host/ohci-at91.c                |    2 +-
> >  drivers/video/atmel_lcdfb.c                 |    2 +-
> >  include/linux/platform_data/atmel.h         |   67 +++++++++++++++++++++++++++
> >  16 files changed, 80 insertions(+), 76 deletions(-)
> 
> <snip>
> 
> > diff --git a/drivers/net/ethernet/cadence/at91_ether.c b/drivers/net/ethernet/cadence/at91_ether.c
> > index 4e980a7..35fc6edb 100644
> > --- a/drivers/net/ethernet/cadence/at91_ether.c
> > +++ b/drivers/net/ethernet/cadence/at91_ether.c
> > @@ -31,6 +31,7 @@
> >  #include <linux/clk.h>
> >  #include <linux/gfp.h>
> >  #include <linux/phy.h>
> > +#include <linux/platform_data/atmel.h>
> >
> >  #include <asm/io.h>
> >  #include <asm/uaccess.h>
> > @@ -38,7 +39,6 @@
> >
> >  #include <mach/at91rm9200_emac.h>
> >  #include <asm/gpio.h>
> > -#include <mach/board.h>
> >
> >  #include "at91_ether.h"
> 
> The at91_ether driver in net-next does not need to be change since it
> all mach includes has already been removed by other patches and it
> includes linux/platform_data/macb.h directly.
> 
> What tree was these patches based on?
> The at91_ether driver changes has been in linux-next for a long while now.
the conflict is minor easy to handle and the cleanup need to go first on arm soc so this is
based on rc3

Best Regards,
J.
Arnd Bergmann Nov. 12, 2012, 9:47 p.m. UTC | #6
On Wednesday 07 November 2012, Jean-Christophe PLAGNIOL-VILLARD wrote:
> The following changes since commit 8f0d8163b50e01f398b14bcd4dc039ac5ab18d64:
> 
>   Linux 3.7-rc3 (2012-10-28 12:24:48 -0700)
> 
> are available in the git repository at:
> 
>   git://github.com/at91linux/linux-at91.git tags/for-3.8-at91_header_clean
> 
> for you to fetch changes up to 75984df05d86956541795f01e62d7dc67bc522fd:
> 
>   arm: at91: move at91rm9200 rtc header in drivers/rtc (2012-11-06 20:30:52 +0800)
> 
> ----------------------------------------------------------------
> arm: at91: mach header cleanup
> 
> This first patch serie start the cleanup of the header in mach
> by moving all the platform data to include/linux/platform_data
> 
> and move the board header and drivers header next to them
> 
> Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
> Cc: Nicolas Ferre <nicolas.ferre@atmel.com>
> 

Hi Jean-Christophe,

Sorry for the delay, I've pulled it now into the next/cleanup branch.

Nice work!

	Arnd
Joachim Eastwood Nov. 17, 2012, 3:32 p.m. UTC | #7
On 12 November 2012 22:47, Arnd Bergmann <arnd@arndb.de> wrote:
> On Wednesday 07 November 2012, Jean-Christophe PLAGNIOL-VILLARD wrote:
>> The following changes since commit 8f0d8163b50e01f398b14bcd4dc039ac5ab18d64:
>>
>>   Linux 3.7-rc3 (2012-10-28 12:24:48 -0700)
>>
>> are available in the git repository at:
>>
>>   git://github.com/at91linux/linux-at91.git tags/for-3.8-at91_header_clean
>>
>> for you to fetch changes up to 75984df05d86956541795f01e62d7dc67bc522fd:
>>
>>   arm: at91: move at91rm9200 rtc header in drivers/rtc (2012-11-06 20:30:52 +0800)
>>
>> ----------------------------------------------------------------
>> arm: at91: mach header cleanup
>>
>> This first patch serie start the cleanup of the header in mach
>> by moving all the platform data to include/linux/platform_data
>>
>> and move the board header and drivers header next to them
>>
>> Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
>> Cc: Nicolas Ferre <nicolas.ferre@atmel.com>
>>
>
> Hi Jean-Christophe,
>
> Sorry for the delay, I've pulled it now into the next/cleanup branch.
>

Hi,

The changes to atmel_serial break compile on AVR32 with:
  drivers/tty/serial/atmel_serial.c:162: error: 'ATMEL_MAX_UART'
undeclared here (not in a function)
  make[3]: *** [drivers/tty/serial/atmel_serial.o] Error 1

This is because AVR32 defined ATMEL_MAX_UART in mach/board.h.
I wonder why this didn't break on AT91, though. On AT91 it's defined in
mach/hardware.h but I can't see that file being included anywhere here.

Unsure what the best fix is. Maybe we could move ATMEL_MAX_UART into
linux/platform_data/atmel.h.

regards
Joachim Eastwood
Jean-Christophe PLAGNIOL-VILLARD Nov. 17, 2012, 10:02 p.m. UTC | #8
On 16:32 Sat 17 Nov     , Joachim Eastwood wrote:
> On 12 November 2012 22:47, Arnd Bergmann <arnd@arndb.de> wrote:
> > On Wednesday 07 November 2012, Jean-Christophe PLAGNIOL-VILLARD wrote:
> >> The following changes since commit 8f0d8163b50e01f398b14bcd4dc039ac5ab18d64:
> >>
> >>   Linux 3.7-rc3 (2012-10-28 12:24:48 -0700)
> >>
> >> are available in the git repository at:
> >>
> >>   git://github.com/at91linux/linux-at91.git tags/for-3.8-at91_header_clean
> >>
> >> for you to fetch changes up to 75984df05d86956541795f01e62d7dc67bc522fd:
> >>
> >>   arm: at91: move at91rm9200 rtc header in drivers/rtc (2012-11-06 20:30:52 +0800)
> >>
> >> ----------------------------------------------------------------
> >> arm: at91: mach header cleanup
> >>
> >> This first patch serie start the cleanup of the header in mach
> >> by moving all the platform data to include/linux/platform_data
> >>
> >> and move the board header and drivers header next to them
> >>
> >> Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
> >> Cc: Nicolas Ferre <nicolas.ferre@atmel.com>
> >>
> >
> > Hi Jean-Christophe,
> >
> > Sorry for the delay, I've pulled it now into the next/cleanup branch.
> >
> 
> Hi,
> 
> The changes to atmel_serial break compile on AVR32 with:
>   drivers/tty/serial/atmel_serial.c:162: error: 'ATMEL_MAX_UART'
> undeclared here (not in a function)
>   make[3]: *** [drivers/tty/serial/atmel_serial.o] Error 1
> 
> This is because AVR32 defined ATMEL_MAX_UART in mach/board.h.
> I wonder why this didn't break on AT91, though. On AT91 it's defined in
> mach/hardware.h but I can't see that file being included anywhere here.
> 
> Unsure what the best fix is. Maybe we could move ATMEL_MAX_UART into
> linux/platform_data/atmel.h.
I already spot it too and fix it

yes I move it to platform_data/atmel.h

I does not break on at91 as hardware.h is inlcluded when you
include/linux/io.h

Best Regards,
J.
Nicolas Ferre Nov. 19, 2012, 9:09 a.m. UTC | #9
On 11/17/2012 11:05 PM, Jean-Christophe PLAGNIOL-VILLARD :
> use 7 for it as the sam9260 or the sam9g25 have 7 of them DBGU included
> 
> Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
> Cc: Nicolas Ferre <nicolas.ferre@atmel.com>
> ---
>  arch/arm/mach-at91/include/mach/hardware.h  |    3 ---
>  arch/avr32/mach-at32ap/include/mach/board.h |    1 -
>  include/linux/platform_data/atmel.h         |    6 ++++++
>  3 files changed, 6 insertions(+), 4 deletions(-)
> 
> diff --git a/arch/arm/mach-at91/include/mach/hardware.h b/arch/arm/mach-at91/include/mach/hardware.h
> index 711a789..a832e07 100644
> --- a/arch/arm/mach-at91/include/mach/hardware.h
> +++ b/arch/arm/mach-at91/include/mach/hardware.h
> @@ -90,9 +90,6 @@
>  #define AT91_SRAM_MAX		SZ_1M
>  #define AT91_VIRT_BASE		(AT91_IO_VIRT_BASE - AT91_SRAM_MAX)
>  
> -/* Serial ports */
> -#define ATMEL_MAX_UART		7		/* 6 USART3's and one DBGU port (SAM9260) */
> -
>  /* External Memory Map */
>  #define AT91_CHIPSELECT_0	0x10000000
>  #define AT91_CHIPSELECT_1	0x20000000
> diff --git a/arch/avr32/mach-at32ap/include/mach/board.h b/arch/avr32/mach-at32ap/include/mach/board.h
> index dca9345..d485b03 100644
> --- a/arch/avr32/mach-at32ap/include/mach/board.h
> +++ b/arch/avr32/mach-at32ap/include/mach/board.h
> @@ -26,7 +26,6 @@ static inline void __deprecated at32_add_system_devices(void)
>  
>  }
>  
> -#define ATMEL_MAX_UART	4
>  extern struct platform_device *atmel_default_console_device;
>  
>  /* Flags for selecting USART extra pins */
> diff --git a/include/linux/platform_data/atmel.h b/include/linux/platform_data/atmel.h
> index dbd6d53..59fffa4 100644
> --- a/include/linux/platform_data/atmel.h
> +++ b/include/linux/platform_data/atmel.h
> @@ -19,6 +19,12 @@
>  #include <linux/serial.h>
>  #include <linux/platform_data/macb.h>
>  
> +/*
> + * at91: 6 USART3's and one DBGU port (SAM9260)

Why the "3"?

> + * avr32: 4
> + */
> +#define ATMEL_MAX_UART	7
> +
>   /* USB Device */
>  struct at91_udc_data {
>  	int	vbus_pin;		/* high == host powering us */
> 

Ok otherwise. Do not bother, I may change the typo while including it in
at91-fixes pull request...

Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>

Best regards,