From: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
To: Nicolas Ferre <nicolas.ferre@atmel.com>
Cc: avictor.za@gmail.com, linux-arm-kernel@lists.arm.linux.org.uk,
patrice.vilchez@atmel.com, linux-kernel@vger.kernel.org,
Hong Xu <hong.xu@atmel.com>
Subject: Re: [PATCH 3/5] at91: Support for at91sam9g10: core chip & board support
Date: Fri, 19 Jun 2009 00:28:56 +0200 [thread overview]
Message-ID: <20090618222856.GD19515@game.jcrosoft.org> (raw)
In-Reply-To: <1245341772-1689-4-git-send-email-nicolas.ferre@atmel.com>
On 18:16 Thu 18 Jun , Nicolas Ferre wrote:
> From: Hong Xu <hong.xu@atmel.com>
>
> Here are the modification to at91sam9261 files dedicated to the support of
> at91sam9g10. This direction has been adopted to minimize code duplication.
>
> All at91sam9261 drivers are enabled in _devices and board- files. Modificaton
> to peripherals that support at91sam9g10 will be added in future patches.
>
> Signed-off-by: Hong Xu <hong.xu@atmel.com>
> Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
> ---
> arch/arm/mach-at91/Kconfig | 25 +++++++++++++++++++++++--
> arch/arm/mach-at91/Makefile | 2 ++
> arch/arm/mach-at91/at91sam9261.c | 22 +++++++++++++++++++++-
> arch/arm/mach-at91/board-sam9261ek.c | 14 ++++++++++++++
> arch/arm/mach-at91/pm.c | 3 ++-
> 5 files changed, 62 insertions(+), 4 deletions(-)
>
> diff --git a/arch/arm/mach-at91/Kconfig b/arch/arm/mach-at91/Kconfig
> index 22309ba..8f3e15a 100644
> --- a/arch/arm/mach-at91/Kconfig
> +++ b/arch/arm/mach-at91/Kconfig
> @@ -23,6 +23,12 @@ config ARCH_AT91SAM9261
> select GENERIC_TIME
> select GENERIC_CLOCKEVENTS
>
> +config ARCH_AT91SAM9G10
> + bool "AT91SAM9G10"
> + select CPU_ARM926T
> + select GENERIC_TIME
> + select GENERIC_CLOCKEVENTS
> +
> config ARCH_AT91SAM9263
> bool "AT91SAM9263"
> select CPU_ARM926T
> @@ -230,6 +236,21 @@ endif
>
> # ----------------------------------------------------------
>
> +if ARCH_AT91SAM9G10
> +
> +comment "AT91SAM9G10 Board Type"
> +
> +config MACH_AT91SAM9G10EK
> + bool "Atmel AT91SAM9G10-EK Evaluation Kit"
> + depends on ARCH_AT91SAM9G10
> + help
> + Select this if you are using Atmel's AT91SAM9G10-EK Evaluation Kit.
> + <http://www.atmel.com/dyn/products/tools_card.asp?tool_id=4588>
> +
> +endif
> +
> +# ----------------------------------------------------------
> +
> if ARCH_AT91SAM9263
>
> comment "AT91SAM9263 Board Type"
> @@ -337,13 +358,13 @@ comment "AT91 Board Options"
>
> config MTD_AT91_DATAFLASH_CARD
> bool "Enable DataFlash Card support"
> - depends on (ARCH_AT91RM9200DK || MACH_AT91RM9200EK || MACH_AT91SAM9260EK || MACH_AT91SAM9261EK || MACH_AT91SAM9263EK || MACH_AT91SAM9G20EK || MACH_ECBAT91 || MACH_SAM9_L9260 || MACH_AT91CAP9ADK || MACH_NEOCORE926)
> + depends on (ARCH_AT91RM9200DK || MACH_AT91RM9200EK || MACH_AT91SAM9260EK || MACH_AT91SAM9261EK || MACH_AT91SAM9G10EK || MACH_AT91SAM9263EK || MACH_AT91SAM9G20EK || MACH_ECBAT91 || MACH_SAM9_L9260 || MACH_AT91CAP9ADK || MACH_NEOCORE926)
can we reduce it and do as the propostion for the FB and create a new
config and then select it at the board?
> help
> Enable support for the DataFlash card.
>
> config MTD_NAND_ATMEL_BUSWIDTH_16
> bool "Enable 16-bit data bus interface to NAND flash"
> - depends on (MACH_AT91SAM9260EK || MACH_AT91SAM9261EK || MACH_AT91SAM9263EK || MACH_AT91SAM9G20EK || MACH_AT91SAM9G45EKES || MACH_AT91CAP9ADK)
> + depends on (MACH_AT91SAM9260EK || MACH_AT91SAM9261EK || MACH_AT91SAM9G10EK || MACH_AT91SAM9263EK || MACH_AT91SAM9G20EK || MACH_AT91SAM9G45EKES || MACH_AT91CAP9ADK)
ditto
> help
> On AT91SAM926x boards both types of NAND flash can be present
> (8 and 16 bit data bus width).
> diff --git a/arch/arm/mach-at91/Makefile b/arch/arm/mach-at91/Makefile
> index 2975f9a..4eaf80a 100644
> --- a/arch/arm/mach-at91/Makefile
> +++ b/arch/arm/mach-at91/Makefile
> @@ -13,6 +13,7 @@ obj-$(CONFIG_AT91_PMC_UNIT) += clock.o
> obj-$(CONFIG_ARCH_AT91RM9200) += at91rm9200.o at91rm9200_time.o at91rm9200_devices.o
> obj-$(CONFIG_ARCH_AT91SAM9260) += at91sam9260.o at91sam926x_time.o at91sam9260_devices.o sam9_smc.o
> obj-$(CONFIG_ARCH_AT91SAM9261) += at91sam9261.o at91sam926x_time.o at91sam9261_devices.o sam9_smc.o
> +obj-$(CONFIG_ARCH_AT91SAM9G10) += at91sam9261.o at91sam926x_time.o at91sam9261_devices.o sam9_smc.o
> obj-$(CONFIG_ARCH_AT91SAM9263) += at91sam9263.o at91sam926x_time.o at91sam9263_devices.o sam9_smc.o
> obj-$(CONFIG_ARCH_AT91SAM9RL) += at91sam9rl.o at91sam926x_time.o at91sam9rl_devices.o sam9_smc.o
> obj-$(CONFIG_ARCH_AT91SAM9G20) += at91sam9260.o at91sam926x_time.o at91sam9260_devices.o sam9_smc.o
> @@ -44,6 +45,7 @@ obj-$(CONFIG_MACH_AFEB9260) += board-afeb-9260v1.o
>
> # AT91SAM9261 board-specific support
> obj-$(CONFIG_MACH_AT91SAM9261EK) += board-sam9261ek.o
> +obj-$(CONFIG_MACH_AT91SAM9G10EK) += board-sam9261ek.o
>
> # AT91SAM9263 board-specific support
> obj-$(CONFIG_MACH_AT91SAM9263EK) += board-sam9263ek.o
> diff --git a/arch/arm/mach-at91/at91sam9261.c b/arch/arm/mach-at91/at91sam9261.c
> index 3acd7d7..4ecf379 100644
> --- a/arch/arm/mach-at91/at91sam9261.c
> +++ b/arch/arm/mach-at91/at91sam9261.c
> @@ -16,6 +16,7 @@
> #include <asm/irq.h>
> #include <asm/mach/arch.h>
> #include <asm/mach/map.h>
> +#include <mach/cpu.h>
> #include <mach/at91sam9261.h>
> #include <mach/at91_pmc.h>
> #include <mach/at91_rstc.h>
> @@ -30,7 +31,11 @@ static struct map_desc at91sam9261_io_desc[] __initdata = {
> .pfn = __phys_to_pfn(AT91_BASE_SYS),
> .length = SZ_16K,
> .type = MT_DEVICE,
> - }, {
> + },
> +};
> +
> +static struct map_desc at91sam9261_sram_desc[] __initdata = {
> + {
> .virtual = AT91_IO_VIRT_BASE - AT91SAM9261_SRAM_SIZE,
> .pfn = __phys_to_pfn(AT91SAM9261_SRAM_BASE),
> .length = AT91SAM9261_SRAM_SIZE,
> @@ -38,6 +43,15 @@ static struct map_desc at91sam9261_io_desc[] __initdata = {
> },
> };
>
> +static struct map_desc at91sam9g10_sram_desc[] __initdata = {
> + {
> + .virtual = AT91_IO_VIRT_BASE - AT91SAM9G10_SRAM_SIZE,
> + .pfn = __phys_to_pfn(AT91SAM9G10_SRAM_BASE),
> + .length = AT91SAM9G10_SRAM_SIZE,
> + .type = MT_DEVICE,
> + },
> +};
> +
> /* --------------------------------------------------------------------
> * Clocks
> * -------------------------------------------------------------------- */
> @@ -263,6 +277,12 @@ void __init at91sam9261_initialize(unsigned long main_clock)
> /* Map peripherals */
> iotable_init(at91sam9261_io_desc, ARRAY_SIZE(at91sam9261_io_desc));
>
> + if (cpu_is_at91sam9g10())
> + iotable_init(at91sam9g10_sram_desc, ARRAY_SIZE(at91sam9g10_sram_desc));
> + else
> + iotable_init(at91sam9261_sram_desc, ARRAY_SIZE(at91sam9261_sram_desc));
> +
> +
> at91_arch_reset = at91sam9261_reset;
> pm_power_off = at91sam9261_poweroff;
> at91_extern_irq = (1 << AT91SAM9261_ID_IRQ0) | (1 << AT91SAM9261_ID_IRQ1)
> diff --git a/arch/arm/mach-at91/board-sam9261ek.c b/arch/arm/mach-at91/board-sam9261ek.c
> index d5266da..f9b1999 100644
> --- a/arch/arm/mach-at91/board-sam9261ek.c
> +++ b/arch/arm/mach-at91/board-sam9261ek.c
> @@ -287,7 +287,11 @@ static void __init ek_add_device_ts(void) {}
> */
> static struct at73c213_board_info at73c213_data = {
> .ssc_id = 1,
> +#if defined(CONFIG_MACH_AT91SAM9261EK)
> .shortname = "AT91SAM9261-EK external DAC",
> +#else
> + .shortname = "AT91SAM9G10-EK external DAC",
> +#endif
> };
>
> #if defined(CONFIG_SND_AT73C213) || defined(CONFIG_SND_AT73C213_MODULE)
> @@ -414,6 +418,9 @@ static struct atmel_lcdfb_info __initdata ek_lcdc_data = {
> .default_monspecs = &at91fb_default_stn_monspecs,
> .atmel_lcdfb_power_control = at91_lcdc_stn_power_control,
> .guard_time = 1,
> +#if defined(CONFIG_MACH_AT91SAM9G10EK)
> + .lcd_wiring_mode = ATMEL_LCDC_WIRING_RGB,
> +#endif
> };
>
> #else
> @@ -467,6 +474,9 @@ static struct atmel_lcdfb_info __initdata ek_lcdc_data = {
> .default_monspecs = &at91fb_default_tft_monspecs,
> .atmel_lcdfb_power_control = at91_lcdc_tft_power_control,
> .guard_time = 1,
> +#if defined(CONFIG_MACH_AT91SAM9G10EK)
> + .lcd_wiring_mode = ATMEL_LCDC_WIRING_RGB,
> +#endif
> };
> #endif
>
> @@ -600,7 +610,11 @@ static void __init ek_board_init(void)
> at91_gpio_leds(ek_leds, ARRAY_SIZE(ek_leds));
> }
>
> +#if defined(CONFIG_MACH_AT91SAM9261EK)
> MACHINE_START(AT91SAM9261EK, "Atmel AT91SAM9261-EK")
> +#else
> +MACHINE_START(AT91SAM9G10EK, "Atmel AT91SAM9G10-EK")
> +#endif
> /* Maintainer: Atmel */
> .phys_io = AT91_BASE_SYS,
> .io_pg_offst = (AT91_VA_BASE_SYS >> 18) & 0xfffc,
> diff --git a/arch/arm/mach-at91/pm.c b/arch/arm/mach-at91/pm.c
> index e26c4fe..4028724 100644
> --- a/arch/arm/mach-at91/pm.c
> +++ b/arch/arm/mach-at91/pm.c
> @@ -201,7 +201,8 @@ static int at91_pm_verify_clocks(void)
> pr_err("AT91: PM - Suspend-to-RAM with USB still active\n");
> return 0;
> }
> - } else if (cpu_is_at91sam9260() || cpu_is_at91sam9261() || cpu_is_at91sam9263() || cpu_is_at91sam9g20()) {
> + } else if (cpu_is_at91sam9260() || cpu_is_at91sam9261() || cpu_is_at91sam9263()
> + || cpu_is_at91sam9g20() || cpu_is_at91sam9g10()) {
instead add more and more cpu_is why not cpu_has_pmc_uhp() ?
Best Regards,
J.
next prev parent reply other threads:[~2009-06-18 22:33 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-18 16:16 [PATCH 0/5] at91: Introduction of at91sam9g10 SOC Nicolas Ferre
2009-06-18 16:16 ` [PATCH 1/5] at91: Basic support for at91sam9g10: header files Nicolas Ferre
2009-06-18 16:16 ` [PATCH 2/5] at91: Support for at91sam9g10: clocks management Nicolas Ferre
2009-06-18 16:16 ` [PATCH 3/5] at91: Support for at91sam9g10: core chip & board support Nicolas Ferre
2009-06-18 22:28 ` Jean-Christophe PLAGNIOL-VILLARD [this message]
2009-06-18 16:16 ` [PATCH 4/5] at91/USB: USB drivers modifications for at91sam9g10 Nicolas Ferre
2009-09-16 11:59 ` Nicolas Ferre
2009-09-25 10:24 ` Nicolas Ferre
2009-09-25 17:51 ` David Brownell
2009-09-29 7:59 ` Nicolas Ferre
2009-09-29 17:40 ` Greg KH
2009-10-20 13:01 ` Nicolas Ferre
2009-06-18 16:16 ` [PATCH 5/5] at91/atmel_lcdfb: add at91sam9g10 support to atmel LCD driver Nicolas Ferre
2009-06-18 22:24 ` Jean-Christophe PLAGNIOL-VILLARD
2009-06-23 13:20 ` Nicolas Ferre
2009-06-23 14:30 ` [RFC PATCH] atmel_lcdfb Kconfig: remove long dependency line Nicolas Ferre
2009-06-23 13:35 ` Haavard Skinnemoen
2009-06-23 14:12 ` Nicolas Ferre
2009-06-25 8:46 ` Russell King - ARM Linux
2009-11-03 14:42 ` Nicolas Ferre
2009-11-03 21:05 ` Russell King - ARM Linux
2009-11-13 15:27 ` Nicolas Ferre
2009-06-23 14:13 ` Jean-Christophe PLAGNIOL-VILLARD
2009-07-06 10:32 ` [PATCH 5/5] at91/atmel_lcdfb: add at91sam9g10 support to atmel LCD driver Nicolas Ferre
2009-07-20 22:24 ` Andrew Morton
2009-07-21 9:31 ` Nicolas Ferre
2009-06-25 22:00 ` [PATCH 0/5] at91: Introduction of at91sam9g10 SOC Andrew Victor
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20090618222856.GD19515@game.jcrosoft.org \
--to=plagnioj@jcrosoft.com \
--cc=avictor.za@gmail.com \
--cc=hong.xu@atmel.com \
--cc=linux-arm-kernel@lists.arm.linux.org.uk \
--cc=linux-kernel@vger.kernel.org \
--cc=nicolas.ferre@atmel.com \
--cc=patrice.vilchez@atmel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome