Help!

[PATCH 0/5] at91: Introduction of at91sam9g10 SOC

 
  

Goto page 1, 2
Post new topic   General Reply to Topic (not reply to a specific post)    Forums Home -> Kernel RSS
Next:  [PATCH] [BUGFIX] bsdacct: Fix access to invalid f..  
Author Message
Nicolas Ferre
External


Since: May 12, 2009
Posts: 28



PostPosted: Thu Jun 18, 2009 12:10 pm    Post subject: [PATCH 0/5] at91: Introduction of at91sam9g10 SOC
Archived from groups: linux>kernel (more info?)

AT91sam9g10 is an ARM 926ej-s SOC. It is an evolution of the at91sam9261 with a
faster clock speed: 266/133MHz.

This patchset is relying on the integration of at91sam9g45 already posted. Here
is the patch series that you will have to take into account before applying
those patches.

clock.c changes:
http://www.arm.linux.org.uk/developer/patches/viewpatch.php?id=5438/1

9g45 introduction:
http://lkml.org/lkml/2009/6/4/77
http://lkml.org/lkml/2009/6/4/76
http://lkml.org/lkml/2009/6/4/78

---
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/clock.c | 6 ++-
arch/arm/mach-at91/include/mach/at91sam9261.h | 3 ++
arch/arm/mach-at91/include/mach/cpu.h | 7 ++++
arch/arm/mach-at91/include/mach/hardware.h | 2 +-
arch/arm/mach-at91/include/mach/timex.h | 5 +++
arch/arm/mach-at91/pm.c | 3 +-
drivers/usb/gadget/at91_udc.c | 6 ++--
drivers/usb/host/ohci-at91.c | 10 +++---
drivers/video/Kconfig | 4 +-
drivers/video/atmel_lcdfb.c | 6 ++-
drivers/video/backlight/Kconfig | 2 +-
15 files changed, 97 insertions(+), 20 deletions(-)


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo.DeleteThis@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to top
Nicolas Ferre
External


Since: May 12, 2009
Posts: 28



PostPosted: Thu Jun 18, 2009 12:10 pm    Post subject: [PATCH 3/5] at91: Support for at91sam9g10: core chip & board support [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

From: Hong Xu <hong.xu.DeleteThis@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.DeleteThis@atmel.com>
Signed-off-by: Nicolas Ferre <nicolas.ferre.DeleteThis@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)
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)
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 >> 1Cool & 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()) {
if ((scsr & (AT91SAM926x_PMC_UHP | AT91SAM926x_PMC_UDP)) != 0) {
pr_err("AT91: PM - Suspend-to-RAM with USB still active\n");
return 0;
--
1.5.3.7

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo.DeleteThis@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to top
Nicolas Ferre
External


Since: May 12, 2009
Posts: 28



PostPosted: Thu Jun 18, 2009 12:10 pm    Post subject: [PATCH 2/5] at91: Support for at91sam9g10: clocks management [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

From: Hong Xu <hong.xu.TakeThisOut@atmel.com>

Add the at91sam9g10 support to the AT91 generic clock file. It takes
advantage of the management by functionalities of those PLLs and clocks.

Signed-off-by: Hong Xu <hong.xu.TakeThisOut@atmel.com>
Signed-off-by: Nicolas Ferre <nicolas.ferre.TakeThisOut@atmel.com>
---
arch/arm/mach-at91/clock.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mach-at91/clock.c b/arch/arm/mach-at91/clock.c
index 6396680..c042dcf 100644
--- a/arch/arm/mach-at91/clock.c
+++ b/arch/arm/mach-at91/clock.c
@@ -53,7 +53,7 @@
#define cpu_has_800M_plla() ( cpu_is_at91sam9g20() \
|| cpu_is_at91sam9g45())

-#define cpu_has_300M_plla() (0)
+#define cpu_has_300M_plla() (cpu_is_at91sam9g10())

#define cpu_has_pllb() (!(cpu_is_at91sam9rl() \
|| cpu_is_at91sam9g45()))
@@ -626,7 +626,9 @@ static void __init at91_pllb_usbfs_clock_init(unsigned long main_clock)
uhpck.pmc_mask = AT91RM9200_PMC_UHP;
udpck.pmc_mask = AT91RM9200_PMC_UDP;
at91_sys_write(AT91_PMC_SCER, AT91RM9200_PMC_MCKUDP);
- } 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()) {
uhpck.pmc_mask = AT91SAM926x_PMC_UHP;
udpck.pmc_mask = AT91SAM926x_PMC_UDP;
} else if (cpu_is_at91cap9()) {
--
1.5.3.7

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo.TakeThisOut@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to top
Nicolas Ferre
External


Since: May 12, 2009
Posts: 28



PostPosted: Thu Jun 18, 2009 12:10 pm    Post subject: [PATCH 4/5] at91/USB: USB drivers modifications for at91sam9g10 [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

From: Hong Xu <hong.xu.RemoveThis@atmel.com>

Modify both host and gadget USB drivers for at91sam9g10.
This add a clock management equivalent to at91sam9261 on usb drivers.
It also add the way of handling gadget pull-ups (like the at91sam9261).

Signed-off-by: Hong Xu <hong.xu.RemoveThis@atmel.com>
Signed-off-by: Nicolas Ferre <nicolas.ferre.RemoveThis@atmel.com>
---
drivers/usb/gadget/at91_udc.c | 6 +++---
drivers/usb/host/ohci-at91.c | 10 +++++-----
2 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/drivers/usb/gadget/at91_udc.c b/drivers/usb/gadget/at91_udc.c
index 0b2bb8f..bfed3d9 100644
--- a/drivers/usb/gadget/at91_udc.c
+++ b/drivers/usb/gadget/at91_udc.c
@@ -892,7 +892,7 @@ static void pullup(struct at91_udc *udc, int is_on)

txvc |= AT91_UDP_TXVC_PUON;
at91_udp_write(udc, AT91_UDP_TXVC, txvc);
- } else if (cpu_is_at91sam9261()) {
+ } else if (cpu_is_at91sam9261() || cpu_is_at91sam9g10()) {
u32 usbpucr;

usbpucr = at91_sys_read(AT91_MATRIX_USBPUCR);
@@ -910,7 +910,7 @@ static void pullup(struct at91_udc *udc, int is_on)

txvc &= ~AT91_UDP_TXVC_PUON;
at91_udp_write(udc, AT91_UDP_TXVC, txvc);
- } else if (cpu_is_at91sam9261()) {
+ } else if (cpu_is_at91sam9261() || cpu_is_at91sam9g10()) {
u32 usbpucr;

usbpucr = at91_sys_read(AT91_MATRIX_USBPUCR);
@@ -1692,7 +1692,7 @@ static int __init at91udc_probe(struct platform_device *pdev)
udc->ep[3].maxpacket = 64;
udc->ep[4].maxpacket = 512;
udc->ep[5].maxpacket = 512;
- } else if (cpu_is_at91sam9261()) {
+ } else if (cpu_is_at91sam9261() || cpu_is_at91sam9g10()) {
udc->ep[3].maxpacket = 64;
} else if (cpu_is_at91sam9263()) {
udc->ep[0].maxpacket = 64;
diff --git a/drivers/usb/host/ohci-at91.c b/drivers/usb/host/ohci-at91.c
index b29b0fe..fb64def 100644
--- a/drivers/usb/host/ohci-at91.c
+++ b/drivers/usb/host/ohci-at91.c
@@ -35,7 +35,7 @@ extern int usb_disabled(void);

static void at91_start_clock(void)
{
- if (cpu_is_at91sam9261())
+ if (cpu_is_at91sam9261() || cpu_is_at91sam9g10())
clk_enable(hclk);
clk_enable(iclk);
clk_enable(fclk);
@@ -46,7 +46,7 @@ static void at91_stop_clock(void)
{
clk_disable(fclk);
clk_disable(iclk);
- if (cpu_is_at91sam9261())
+ if (cpu_is_at91sam9261() || cpu_is_at91sam9g10())
clk_disable(hclk);
clocked = 0;
}
@@ -142,7 +142,7 @@ static int usb_hcd_at91_probe(const struct hc_driver *driver,

iclk = clk_get(&pdev->dev, "ohci_clk");
fclk = clk_get(&pdev->dev, "uhpck");
- if (cpu_is_at91sam9261())
+ if (cpu_is_at91sam9261() || cpu_is_at91sam9g10())
hclk = clk_get(&pdev->dev, "hck0");

at91_start_hc(pdev);
@@ -156,7 +156,7 @@ static int usb_hcd_at91_probe(const struct hc_driver *driver,
/* Error handling */
at91_stop_hc(pdev);

- if (cpu_is_at91sam9261())
+ if (cpu_is_at91sam9261() || cpu_is_at91sam9g10())
clk_put(hclk);
clk_put(fclk);
clk_put(iclk);
@@ -193,7 +193,7 @@ static void usb_hcd_at91_remove(struct usb_hcd *hcd,
release_mem_region(hcd->rsrc_start, hcd->rsrc_len);
usb_put_hcd(hcd);

- if (cpu_is_at91sam9261())
+ if (cpu_is_at91sam9261() || cpu_is_at91sam9g10())
clk_put(hclk);
clk_put(fclk);
clk_put(iclk);
--
1.5.3.7

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo.RemoveThis@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to top
Nicolas Ferre
External


Since: May 12, 2009
Posts: 28



PostPosted: Thu Jun 18, 2009 12:10 pm    Post subject: [PATCH 5/5] at91/atmel_lcdfb: add at91sam9g10 support to atmel LCD driver [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

From: Hong Xu <hong.xu.DeleteThis@atmel.com>

Modify atmel LCD driver: atmel_lcdfb for at91sam9g10. This add a clock
management equivalent to at91sam9261.

Signed-off-by: Hong Xu <hong.xu.DeleteThis@atmel.com>
Signed-off-by: Nicolas Ferre <nicolas.ferre.DeleteThis@atmel.com>
---
drivers/video/Kconfig | 4 ++--
drivers/video/atmel_lcdfb.c | 6 ++++--
drivers/video/backlight/Kconfig | 2 +-
3 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig
index 5152168..2dbede4 100644
--- a/drivers/video/Kconfig
+++ b/drivers/video/Kconfig
@@ -933,7 +933,7 @@ config FB_S1D13XXX

config FB_ATMEL
tristate "AT91/AT32 LCD Controller support"
- depends on FB && (ARCH_AT91SAM9261 || ARCH_AT91SAM9263 || ARCH_AT91SAM9RL || ARCH_AT91SAM9G45 || ARCH_AT91CAP9 || AVR32)
+ depends on FB && (ARCH_AT91SAM9261 || ARCH_AT91SAM9G10 || ARCH_AT91SAM9263 || ARCH_AT91SAM9RL || ARCH_AT91SAM9G45 || ARCH_AT91CAP9 || AVR32)
select FB_CFB_FILLRECT
select FB_CFB_COPYAREA
select FB_CFB_IMAGEBLIT
@@ -949,7 +949,7 @@ config FB_INTSRAM

config FB_ATMEL_STN
bool "Use a STN display with AT91/AT32 LCD Controller"
- depends on FB_ATMEL && MACH_AT91SAM9261EK
+ depends on FB_ATMEL && (MACH_AT91SAM9261EK || MACH_AT91SAM9G10EK)
default n
help
Say Y if you want to connect a STN LCD display to the AT91/AT32 LCD
diff --git a/drivers/video/atmel_lcdfb.c b/drivers/video/atmel_lcdfb.c
index 9a577a8..fc10ac5 100644
--- a/drivers/video/atmel_lcdfb.c
+++ b/drivers/video/atmel_lcdfb.c
@@ -188,7 +188,8 @@ static unsigned long compute_hozval(unsigned long xres, unsigned long lcdcon2)
{
unsigned long value;

- if (!(cpu_is_at91sam9261() || cpu_is_at32ap7000()))
+ if (!(cpu_is_at91sam9261() || cpu_is_at91sam9g10()
+ || cpu_is_at32ap7000()))
return xres;

value = xres;
@@ -827,7 +828,8 @@ static int __init atmel_lcdfb_probe(struct platform_device *pdev)
info->fix = atmel_lcdfb_fix;

/* Enable LCDC Clocks */
- if (cpu_is_at91sam9261() || cpu_is_at32ap7000()) {
+ if (cpu_is_at91sam9261() || cpu_is_at91sam9g10()
+ || cpu_is_at32ap7000()) {
sinfo->bus_clk = clk_get(dev, "hck1");
if (IS_ERR(sinfo->bus_clk)) {
ret = PTR_ERR(sinfo->bus_clk);
diff --git a/drivers/video/backlight/Kconfig b/drivers/video/backlight/Kconfig
index f9d19be..90861cd 100644
--- a/drivers/video/backlight/Kconfig
+++ b/drivers/video/backlight/Kconfig
@@ -110,7 +110,7 @@ config BACKLIGHT_CLASS_DEVICE
config BACKLIGHT_ATMEL_LCDC
bool "Atmel LCDC Contrast-as-Backlight control"
depends on BACKLIGHT_CLASS_DEVICE && FB_ATMEL
- default y if MACH_SAM9261EK || MACH_SAM9263EK
+ default y if MACH_SAM9261EK || MACH_SAM9G10EK || MACH_SAM9263EK
help
This provides a backlight control internal to the Atmel LCDC
driver. If the LCD "contrast control" on your board is wired
--
1.5.3.7

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo.DeleteThis@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to top
Jean-Christophe PLAGNIOL-
External


Since: Jun 19, 2009
Posts: 5



PostPosted: Thu Jun 18, 2009 7:10 pm    Post subject: Re: [PATCH 5/5] at91/atmel_lcdfb: add at91sam9g10 support to atmel LCD driver [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On 18:16 Thu 18 Jun , Nicolas Ferre wrote:
> From: Hong Xu <hong.xu DeleteThis @atmel.com>
>
> Modify atmel LCD driver: atmel_lcdfb for at91sam9g10. This add a clock
> management equivalent to at91sam9261.
>
> Signed-off-by: Hong Xu <hong.xu DeleteThis @atmel.com>
> Signed-off-by: Nicolas Ferre <nicolas.ferre DeleteThis @atmel.com>
> ---
> drivers/video/Kconfig | 4 ++--
> drivers/video/atmel_lcdfb.c | 6 ++++--
> drivers/video/backlight/Kconfig | 2 +-
> 3 files changed, 7 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig
> index 5152168..2dbede4 100644
> --- a/drivers/video/Kconfig
> +++ b/drivers/video/Kconfig
> @@ -933,7 +933,7 @@ config FB_S1D13XXX
>
> config FB_ATMEL
> tristate "AT91/AT32 LCD Controller support"
> - depends on FB && (ARCH_AT91SAM9261 || ARCH_AT91SAM9263 || ARCH_AT91SAM9RL || ARCH_AT91SAM9G45 || ARCH_AT91CAP9 || AVR32)
> + depends on FB && (ARCH_AT91SAM9261 || ARCH_AT91SAM9G10 || ARCH_AT91SAM9263 || ARCH_AT91SAM9RL || ARCH_AT91SAM9G45 || ARCH_AT91CAP9 || AVR32)
create a ARCH_ATMEL_HAS_FB then select it at the soc will allow to reduce this || xx... by
depends on FB && ARCH_ATMEL_HAS_FB

Best Regards,
J.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo DeleteThis @vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to top
Jean-Christophe PLAGNIOL-
External


Since: Jun 19, 2009
Posts: 5



PostPosted: Thu Jun 18, 2009 9:10 pm    Post subject: Re: [PATCH 3/5] at91: Support for at91sam9g10: core chip & board support [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On 18:16 Thu 18 Jun , Nicolas Ferre wrote:
> From: Hong Xu <hong.xu.DeleteThis@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.DeleteThis@atmel.com>
> Signed-off-by: Nicolas Ferre <nicolas.ferre.DeleteThis@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 >> 1Cool & 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.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo.DeleteThis@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to top
Nicolas Ferre
External


Since: May 12, 2009
Posts: 28



PostPosted: Tue Jun 23, 2009 10:10 am    Post subject: Re: [PATCH 5/5] at91/atmel_lcdfb: add at91sam9g10 support to atmel LCD driver [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Jean-Christophe PLAGNIOL-VILLARD :
> On 18:16 Thu 18 Jun , Nicolas Ferre wrote:
>> From: Hong Xu <hong.xu RemoveThis @atmel.com>
>>
>> Modify atmel LCD driver: atmel_lcdfb for at91sam9g10. This add a clock
>> management equivalent to at91sam9261.
>>
>> Signed-off-by: Hong Xu <hong.xu RemoveThis @atmel.com>
>> Signed-off-by: Nicolas Ferre <nicolas.ferre RemoveThis @atmel.com>
>> ---
>> drivers/video/Kconfig | 4 ++--
>> drivers/video/atmel_lcdfb.c | 6 ++++--
>> drivers/video/backlight/Kconfig | 2 +-
>> 3 files changed, 7 insertions(+), 5 deletions(-)
>>
>> diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig
>> index 5152168..2dbede4 100644
>> --- a/drivers/video/Kconfig
>> +++ b/drivers/video/Kconfig
>> @@ -933,7 +933,7 @@ config FB_S1D13XXX
>>
>> config FB_ATMEL
>> tristate "AT91/AT32 LCD Controller support"
>> - depends on FB && (ARCH_AT91SAM9261 || ARCH_AT91SAM9263 || ARCH_AT91SAM9RL || ARCH_AT91SAM9G45 || ARCH_AT91CAP9 || AVR32)
>> + depends on FB && (ARCH_AT91SAM9261 || ARCH_AT91SAM9G10 || ARCH_AT91SAM9263 || ARCH_AT91SAM9RL || ARCH_AT91SAM9G45 || ARCH_AT91CAP9 || AVR32)
> create a ARCH_ATMEL_HAS_FB then select it at the soc will allow to reduce this || xx... by
> depends on FB && ARCH_ATMEL_HAS_FB

Maybe we can schedule such an update on top of this patch series.
Indeed, as it impacts also AVR32, I propose to build a patch with both
architecture update once at91sam9g45 and at91sam9g10 patchsets are queued.

A proposition follows.

Regards,
--
Nicolas Ferre

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo RemoveThis @vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to top
Nicolas Ferre
External


Since: May 12, 2009
Posts: 28



PostPosted: Tue Jun 23, 2009 10:10 am    Post subject: [RFC PATCH] atmel_lcdfb Kconfig: remove long dependency line [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Many Atmel SOC are embedding a LCD controller. This patch removes the long
dependency line for this Atmel LCD framebuffer driver configuration entry.
The ARCH_ATMEL_HAS_FB configuration option is located in the video Kconfig file
as it may be setup by ARM/AT91 and AVR32 chips.

Signed-off-by: Nicolas Ferre <nicolas.ferre.TakeThisOut@atmel.com>
---
Beware, this proposition goes on top of at91sam9g45 & at91sam9g10 patchsets
already posted. My proposition is to wait for those series are queued before
applying this modification.

arch/arm/mach-at91/Kconfig | 6 ++++++
arch/avr32/Kconfig | 1 +
drivers/video/Kconfig | 7 ++++++-
3 files changed, 13 insertions(+), 1 deletions(-)

diff --git a/arch/arm/mach-at91/Kconfig b/arch/arm/mach-at91/Kconfig
index 8f3e15a..00c7e08 100644
--- a/arch/arm/mach-at91/Kconfig
+++ b/arch/arm/mach-at91/Kconfig
@@ -22,24 +22,28 @@ config ARCH_AT91SAM9261
select CPU_ARM926T
select GENERIC_TIME
select GENERIC_CLOCKEVENTS
+ select ARCH_ATMEL_HAS_FB

config ARCH_AT91SAM9G10
bool "AT91SAM9G10"
select CPU_ARM926T
select GENERIC_TIME
select GENERIC_CLOCKEVENTS
+ select ARCH_ATMEL_HAS_FB

config ARCH_AT91SAM9263
bool "AT91SAM9263"
select CPU_ARM926T
select GENERIC_TIME
select GENERIC_CLOCKEVENTS
+ select ARCH_ATMEL_HAS_FB

config ARCH_AT91SAM9RL
bool "AT91SAM9RL"
select CPU_ARM926T
select GENERIC_TIME
select GENERIC_CLOCKEVENTS
+ select ARCH_ATMEL_HAS_FB

config ARCH_AT91SAM9G20
bool "AT91SAM9G20"
@@ -52,12 +56,14 @@ config ARCH_AT91SAM9G45
select CPU_ARM926T
select GENERIC_TIME
select GENERIC_CLOCKEVENTS
+ select ARCH_ATMEL_HAS_FB

config ARCH_AT91CAP9
bool "AT91CAP9"
select CPU_ARM926T
select GENERIC_TIME
select GENERIC_CLOCKEVENTS
+ select ARCH_ATMEL_HAS_FB

config ARCH_AT91X40
bool "AT91x40"
diff --git a/arch/avr32/Kconfig b/arch/avr32/Kconfig
index 35e3bd9..43d4946 100644
--- a/arch/avr32/Kconfig
+++ b/arch/avr32/Kconfig
@@ -92,6 +92,7 @@ config PLATFORM_AT32AP
select PERFORMANCE_COUNTERS
select ARCH_REQUIRE_GPIOLIB
select GENERIC_ALLOCATOR
+ select ARCH_ATMEL_HAS_FB

#
# CPU types
diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig
index 2dbede4..a2cdf88 100644
--- a/drivers/video/Kconfig
+++ b/drivers/video/Kconfig
@@ -931,9 +931,14 @@ config FB_S1D13XXX
working with S1D13806). Product specs at
<http://www.erd.epson.com/vdc/html/legacy_13xxx.htm>

+config ARCH_ATMEL_HAS_FB
+ bool
+ depends on FB
+ default n
+
config FB_ATMEL
tristate "AT91/AT32 LCD Controller support"
- depends on FB && (ARCH_AT91SAM9261 || ARCH_AT91SAM9G10 || ARCH_AT91SAM9263 || ARCH_AT91SAM9RL || ARCH_AT91SAM9G45 || ARCH_AT91CAP9 || AVR32)
+ depends on FB && ARCH_ATMEL_HAS_FB
select FB_CFB_FILLRECT
select FB_CFB_COPYAREA
select FB_CFB_IMAGEBLIT
--
1.5.3.7

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo.TakeThisOut@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to top
Haavard Skinnemoen
External


Since: Jan 09, 2009
Posts: 7



PostPosted: Tue Jun 23, 2009 10:10 am    Post subject: Re: [RFC PATCH] atmel_lcdfb Kconfig: remove long dependency line [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Nicolas Ferre wrote:
> +config ARCH_ATMEL_HAS_FB
> + bool
> + depends on FB
> + default n

What happens when we unconditionally select something which depends on
something else?

Haavard
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo.TakeThisOut@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to top
Nicolas Ferre
External


Since: May 12, 2009
Posts: 28



PostPosted: Tue Jun 23, 2009 11:10 am    Post subject: Re: [RFC PATCH] atmel_lcdfb Kconfig: remove long dependency line [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Haavard Skinnemoen :
> Nicolas Ferre wrote:
>> +config ARCH_ATMEL_HAS_FB
>> + bool
>> + depends on FB
>> + default n
>
> What happens when we unconditionally select something which depends on
> something else?

Razz

Experience shows that this configuration is selected.

The dependency allows to have a good hierarchy in the configuration tree...
Better proposition welcome.

Bye,
--
Nicolas Ferre

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo.RemoveThis@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to top
Jean-Christophe PLAGNIOL-
External


Since: Jun 19, 2009
Posts: 5



PostPosted: Tue Jun 23, 2009 11:10 am    Post subject: Re: [RFC PATCH] atmel_lcdfb Kconfig: remove long dependency line [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

>
> +config ARCH_ATMEL_HAS_FB
> + bool
> + depends on FB
as you use it just under with the FB condition too
I think you can avoid this depend here
> + default n
> +
> config FB_ATMEL
> tristate "AT91/AT32 LCD Controller support"
> - depends on FB && (ARCH_AT91SAM9261 || ARCH_AT91SAM9G10 || ARCH_AT91SAM9263 || ARCH_AT91SAM9RL || ARCH_AT91SAM9G45 || ARCH_AT91CAP9 || AVR32)
> + depends on FB && ARCH_ATMEL_HAS_FB
> select FB_CFB_FILLRECT
> select FB_CFB_COPYAREA
> select FB_CFB_IMAGEBLIT

Best Regards,
J.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo RemoveThis @vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to top
Russell King - ARM Linux
External


Since: Jan 17, 2009
Posts: 25



PostPosted: Thu Jun 25, 2009 5:10 am    Post subject: Re: [RFC PATCH] atmel_lcdfb Kconfig: remove long dependency line [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On Tue, Jun 23, 2009 at 04:12:54PM +0200, Nicolas Ferre wrote:
> Haavard Skinnemoen :
> > Nicolas Ferre wrote:
> >> +config ARCH_ATMEL_HAS_FB
> >> + bool
> >> + depends on FB
> >> + default n
> >
> > What happens when we unconditionally select something which depends on
> > something else?
>
> Razz
>
> Experience shows that this configuration is selected.
>
> The dependency allows to have a good hierarchy in the configuration tree...
> Better proposition welcome.

1st - no need for 'default n' - you're specifying something that's already
the default.

2nd - don't make this symbol depend on anything, and don't use the symbol
for anything except providing a dependency for FB_ATMEL. Instead, let
FB_ATMEL deal with the dependency on FB and ARCH_ATMEL_HAS_FB.

3rd - ISTR we have a convention for these - 'HAVE_foo' for a configuration
option named 'foo'. So it should probably be HAVE_FB_ATMEL.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo.RemoveThis@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to top
Andrew Victor
External


Since: Jun 18, 2009
Posts: 3



PostPosted: Thu Jun 25, 2009 7:10 pm    Post subject: Re: [PATCH 0/5] at91: Introduction of at91sam9g10 SOC [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

hi Nicolas,

> AT91sam9g10 is an ARM 926ej-s SOC. It is an evolution of the at91sam9261 with a
> faster clock speed: 266/133MHz.
>
> This patchset is relying on the integration of at91sam9g45 already posted. Here
> is the patch series that you will have to take into account before applying
> those patches.

This set of patches looks fine to me.

Acked-by: Andrew Victor <linux DeleteThis @maxim.org.za>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo DeleteThis @vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to top
Nicolas Ferre
External


Since: May 12, 2009
Posts: 28



PostPosted: Mon Jul 06, 2009 7:10 am    Post subject: Re: [PATCH 5/5] at91/atmel_lcdfb: add at91sam9g10 support to atmel LCD driver [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Hi,

Nicolas Ferre :
> From: Hong Xu <hong.xu.RemoveThis@atmel.com>
>
> Modify atmel LCD driver: atmel_lcdfb for at91sam9g10. This add a clock
> management equivalent to at91sam9261.

Can we consider an inclusion in linux-fbdev ?

> Signed-off-by: Hong Xu <hong.xu.RemoveThis@atmel.com>
> Signed-off-by: Nicolas Ferre <nicolas.ferre.RemoveThis@atmel.com>

Andrew Victor added his:
Acked-by: Andrew Victor <linux.RemoveThis@maxim.org.za>

> ---
> drivers/video/Kconfig | 4 ++--
> drivers/video/atmel_lcdfb.c | 6 ++++--
> drivers/video/backlight/Kconfig | 2 +-
> 3 files changed, 7 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig
> index 5152168..2dbede4 100644
> --- a/drivers/video/Kconfig
> +++ b/drivers/video/Kconfig
> @@ -933,7 +933,7 @@ config FB_S1D13XXX
>
> config FB_ATMEL
> tristate "AT91/AT32 LCD Controller support"
> - depends on FB && (ARCH_AT91SAM9261 || ARCH_AT91SAM9263 || ARCH_AT91SAM9RL || ARCH_AT91SAM9G45 || ARCH_AT91CAP9 || AVR32)
> + depends on FB && (ARCH_AT91SAM9261 || ARCH_AT91SAM9G10 || ARCH_AT91SAM9263 || ARCH_AT91SAM9RL || ARCH_AT91SAM9G45 || ARCH_AT91CAP9 || AVR32)
> select FB_CFB_FILLRECT
> select FB_CFB_COPYAREA
> select FB_CFB_IMAGEBLIT
> @@ -949,7 +949,7 @@ config FB_INTSRAM
>
> config FB_ATMEL_STN
> bool "Use a STN display with AT91/AT32 LCD Controller"
> - depends on FB_ATMEL && MACH_AT91SAM9261EK
> + depends on FB_ATMEL && (MACH_AT91SAM9261EK || MACH_AT91SAM9G10EK)
> default n
> help
> Say Y if you want to connect a STN LCD display to the AT91/AT32 LCD
> diff --git a/drivers/video/atmel_lcdfb.c b/drivers/video/atmel_lcdfb.c
> index 9a577a8..fc10ac5 100644
> --- a/drivers/video/atmel_lcdfb.c
> +++ b/drivers/video/atmel_lcdfb.c
> @@ -188,7 +188,8 @@ static unsigned long compute_hozval(unsigned long xres, unsigned long lcdcon2)
> {
> unsigned long value;
>
> - if (!(cpu_is_at91sam9261() || cpu_is_at32ap7000()))
> + if (!(cpu_is_at91sam9261() || cpu_is_at91sam9g10()
> + || cpu_is_at32ap7000()))
> return xres;
>
> value = xres;
> @@ -827,7 +828,8 @@ static int __init atmel_lcdfb_probe(struct platform_device *pdev)
> info->fix = atmel_lcdfb_fix;
>
> /* Enable LCDC Clocks */
> - if (cpu_is_at91sam9261() || cpu_is_at32ap7000()) {
> + if (cpu_is_at91sam9261() || cpu_is_at91sam9g10()
> + || cpu_is_at32ap7000()) {
> sinfo->bus_clk = clk_get(dev, "hck1");
> if (IS_ERR(sinfo->bus_clk)) {
> ret = PTR_ERR(sinfo->bus_clk);
> diff --git a/drivers/video/backlight/Kconfig b/drivers/video/backlight/Kconfig
> index f9d19be..90861cd 100644
> --- a/drivers/video/backlight/Kconfig
> +++ b/drivers/video/backlight/Kconfig
> @@ -110,7 +110,7 @@ config BACKLIGHT_CLASS_DEVICE
> config BACKLIGHT_ATMEL_LCDC
> bool "Atmel LCDC Contrast-as-Backlight control"
> depends on BACKLIGHT_CLASS_DEVICE && FB_ATMEL
> - default y if MACH_SAM9261EK || MACH_SAM9263EK
> + default y if MACH_SAM9261EK || MACH_SAM9G10EK || MACH_SAM9263EK
> help
> This provides a backlight control internal to the Atmel LCDC
> driver. If the LCD "contrast control" on your board is wired


Best regards,
--
Nicolas Ferre

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo.RemoveThis@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to top
Andrew Morton
External


Since: Feb 02, 2007
Posts: 2303



PostPosted: Mon Jul 20, 2009 7:10 pm    Post subject: Re: [PATCH 5/5] at91/atmel_lcdfb: add at91sam9g10 support to atmel LCD driver [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On Mon, 06 Jul 2009 12:32:53 +0200
Nicolas Ferre <nicolas.ferre.TakeThisOut@atmel.com> wrote:

> Hi,
>
> Nicolas Ferre :
> > From: Hong Xu <hong.xu.TakeThisOut@atmel.com>
> >
> > Modify atmel LCD driver: atmel_lcdfb for at91sam9g10. This add a clock
> > management equivalent to at91sam9261.
>
> Can we consider an inclusion in linux-fbdev ?

The patch looks OK to me.

> > Signed-off-by: Hong Xu <hong.xu.TakeThisOut@atmel.com>
> > Signed-off-by: Nicolas Ferre <nicolas.ferre.TakeThisOut@atmel.com>
>
> Andrew Victor added his:
> Acked-by: Andrew Victor <linux.TakeThisOut@maxim.org.za>
>
> > ---
> > drivers/video/Kconfig | 4 ++--
> > drivers/video/atmel_lcdfb.c | 6 ++++--
> > drivers/video/backlight/Kconfig | 2 +-
> > 3 files changed, 7 insertions(+), 5 deletions(-)

Please merge it via an ARM tree?
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo.TakeThisOut@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to top
Nicolas Ferre
External


Since: May 12, 2009
Posts: 28



PostPosted: Tue Jul 21, 2009 6:10 am    Post subject: Re: [PATCH 5/5] at91/atmel_lcdfb: add at91sam9g10 support to atmel LCD driver [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Andrew Morton :
> On Mon, 06 Jul 2009 12:32:53 +0200
> Nicolas Ferre <nicolas.ferre.TakeThisOut@atmel.com> wrote:
>
>> Hi,
>>
>> Nicolas Ferre :
>>> From: Hong Xu <hong.xu.TakeThisOut@atmel.com>
>>>
>>> Modify atmel LCD driver: atmel_lcdfb for at91sam9g10. This add a clock
>>> management equivalent to at91sam9261.
>> Can we consider an inclusion in linux-fbdev ?
>
> The patch looks OK to me.
>
>>> Signed-off-by: Hong Xu <hong.xu.TakeThisOut@atmel.com>
>>> Signed-off-by: Nicolas Ferre <nicolas.ferre.TakeThisOut@atmel.com>
>> Andrew Victor added his:
>> Acked-by: Andrew Victor <linux.TakeThisOut@maxim.org.za>
>>
>>> ---
>>> drivers/video/Kconfig | 4 ++--
>>> drivers/video/atmel_lcdfb.c | 6 ++++--
>>> drivers/video/backlight/Kconfig | 2 +-
>>> 3 files changed, 7 insertions(+), 5 deletions(-)
>
> Please merge it via an ARM tree?

Ok, queued in arm patch tracking system with number: 5614/1
http://www.arm.linux.org.uk/developer/patches/viewpatch.php?id=5614/1

Thanks, Bye,
--
Nicolas Ferre

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo.TakeThisOut@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to top
Nicolas Ferre
External


Since: May 12, 2009
Posts: 28



PostPosted: Wed Sep 16, 2009 9:10 am    Post subject: Re: [PATCH 4/5] at91/USB: USB drivers modifications for at91sam9g10 [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Hi,

Here is a little "ping" about integration of this patch.

Nicolas Ferre :
> From: Hong Xu <hong.xu.TakeThisOut@atmel.com>
>
> Modify both host and gadget USB drivers for at91sam9g10.
> This add a clock management equivalent to at91sam9261 on usb drivers.
> It also add the way of handling gadget pull-ups (like the at91sam9261).

I wonder if we can consider its inclusion as at91sam9g10 is now
integrated in mainline.
Do you want me to split this in several pieces for host/gadget split.

Thanks.

> Signed-off-by: Hong Xu <hong.xu.TakeThisOut@atmel.com>
> Signed-off-by: Nicolas Ferre <nicolas.ferre.TakeThisOut@atmel.com>
> ---
> drivers/usb/gadget/at91_udc.c | 6 +++---
> drivers/usb/host/ohci-at91.c | 10 +++++-----
> 2 files changed, 8 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/usb/gadget/at91_udc.c b/drivers/usb/gadget/at91_udc.c
> index 0b2bb8f..bfed3d9 100644
> --- a/drivers/usb/gadget/at91_udc.c
> +++ b/drivers/usb/gadget/at91_udc.c
> @@ -892,7 +892,7 @@ static void pullup(struct at91_udc *udc, int is_on)
>
> txvc |= AT91_UDP_TXVC_PUON;
> at91_udp_write(udc, AT91_UDP_TXVC, txvc);
> - } else if (cpu_is_at91sam9261()) {
> + } else if (cpu_is_at91sam9261() || cpu_is_at91sam9g10()) {
> u32 usbpucr;
>
> usbpucr = at91_sys_read(AT91_MATRIX_USBPUCR);
> @@ -910,7 +910,7 @@ static void pullup(struct at91_udc *udc, int is_on)
>
> txvc &= ~AT91_UDP_TXVC_PUON;
> at91_udp_write(udc, AT91_UDP_TXVC, txvc);
> - } else if (cpu_is_at91sam9261()) {
> + } else if (cpu_is_at91sam9261() || cpu_is_at91sam9g10()) {
> u32 usbpucr;
>
> usbpucr = at91_sys_read(AT91_MATRIX_USBPUCR);
> @@ -1692,7 +1692,7 @@ static int __init at91udc_probe(struct platform_device *pdev)
> udc->ep[3].maxpacket = 64;
> udc->ep[4].maxpacket = 512;
> udc->ep[5].maxpacket = 512;
> - } else if (cpu_is_at91sam9261()) {
> + } else if (cpu_is_at91sam9261() || cpu_is_at91sam9g10()) {
> udc->ep[3].maxpacket = 64;
> } else if (cpu_is_at91sam9263()) {
> udc->ep[0].maxpacket = 64;
> diff --git a/drivers/usb/host/ohci-at91.c b/drivers/usb/host/ohci-at91.c
> index b29b0fe..fb64def 100644
> --- a/drivers/usb/host/ohci-at91.c
> +++ b/drivers/usb/host/ohci-at91.c
> @@ -35,7 +35,7 @@ extern int usb_disabled(void);
>
> static void at91_start_clock(void)
> {
> - if (cpu_is_at91sam9261())
> + if (cpu_is_at91sam9261() || cpu_is_at91sam9g10())
> clk_enable(hclk);
> clk_enable(iclk);
> clk_enable(fclk);
> @@ -46,7 +46,7 @@ static void at91_stop_clock(void)
> {
> clk_disable(fclk);
> clk_disable(iclk);
> - if (cpu_is_at91sam9261())
> + if (cpu_is_at91sam9261() || cpu_is_at91sam9g10())
> clk_disable(hclk);
> clocked = 0;
> }
> @@ -142,7 +142,7 @@ static int usb_hcd_at91_probe(const struct hc_driver *driver,
>
> iclk = clk_get(&pdev->dev, "ohci_clk");
> fclk = clk_get(&pdev->dev, "uhpck");
> - if (cpu_is_at91sam9261())
> + if (cpu_is_at91sam9261() || cpu_is_at91sam9g10())
> hclk = clk_get(&pdev->dev, "hck0");
>
> at91_start_hc(pdev);
> @@ -156,7 +156,7 @@ static int usb_hcd_at91_probe(const struct hc_driver *driver,
> /* Error handling */
> at91_stop_hc(pdev);
>
> - if (cpu_is_at91sam9261())
> + if (cpu_is_at91sam9261() || cpu_is_at91sam9g10())
> clk_put(hclk);
> clk_put(fclk);
> clk_put(iclk);
> @@ -193,7 +193,7 @@ static void usb_hcd_at91_remove(struct usb_hcd *hcd,
> release_mem_region(hcd->rsrc_start, hcd->rsrc_len);
> usb_put_hcd(hcd);
>
> - if (cpu_is_at91sam9261())
> + if (cpu_is_at91sam9261() || cpu_is_at91sam9g10())
> clk_put(hclk);
> clk_put(fclk);
> clk_put(iclk);


--
Nicolas Ferre

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo.TakeThisOut@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to top
Nicolas Ferre
External


Since: May 12, 2009
Posts: 28



PostPosted: Fri Sep 25, 2009 7:10 am    Post subject: Re: [PATCH 4/5] at91/USB: USB drivers modifications for at91sam9g10 [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Greg,

Please, can you consider the inclusion of this patch. I have no news
about it for a long time...

Here is a link to its patchwork entry:
http://patchwork.kernel.org/patch/31173/

Thanks for your help.

Nicolas Ferre :
> Hi,
>
> Here is a little "ping" about integration of this patch.
>
> Nicolas Ferre :
>> From: Hong Xu <hong.xu DeleteThis @atmel.com>
>>
>> Modify both host and gadget USB drivers for at91sam9g10.
>> This add a clock management equivalent to at91sam9261 on usb drivers.
>> It also add the way of handling gadget pull-ups (like the at91sam9261).
>
> I wonder if we can consider its inclusion as at91sam9g10 is now
> integrated in mainline.
> Do you want me to split this in several pieces for host/gadget split.
>
> Thanks.
>
>> Signed-off-by: Hong Xu <hong.xu DeleteThis @atmel.com>
>> Signed-off-by: Nicolas Ferre <nicolas.ferre DeleteThis @atmel.com>
>> ---
>> drivers/usb/gadget/at91_udc.c | 6 +++---
>> drivers/usb/host/ohci-at91.c | 10 +++++-----
>> 2 files changed, 8 insertions(+), 8 deletions(-)
>>
>> diff --git a/drivers/usb/gadget/at91_udc.c b/drivers/usb/gadget/at91_udc.c
>> index 0b2bb8f..bfed3d9 100644
>> --- a/drivers/usb/gadget/at91_udc.c
>> +++ b/drivers/usb/gadget/at91_udc.c
>> @@ -892,7 +892,7 @@ static void pullup(struct at91_udc *udc, int is_on)
>>
>> txvc |= AT91_UDP_TXVC_PUON;
>> at91_udp_write(udc, AT91_UDP_TXVC, txvc);
>> - } else if (cpu_is_at91sam9261()) {
>> + } else if (cpu_is_at91sam9261() || cpu_is_at91sam9g10()) {
>> u32 usbpucr;
>>
>> usbpucr = at91_sys_read(AT91_MATRIX_USBPUCR);
>> @@ -910,7 +910,7 @@ static void pullup(struct at91_udc *udc, int is_on)
>>
>> txvc &= ~AT91_UDP_TXVC_PUON;
>> at91_udp_write(udc, AT91_UDP_TXVC, txvc);
>> - } else if (cpu_is_at91sam9261()) {
>> + } else if (cpu_is_at91sam9261() || cpu_is_at91sam9g10()) {
>> u32 usbpucr;
>>
>> usbpucr = at91_sys_read(AT91_MATRIX_USBPUCR);
>> @@ -1692,7 +1692,7 @@ static int __init at91udc_probe(struct platform_device *pdev)
>> udc->ep[3].maxpacket = 64;
>> udc->ep[4].maxpacket = 512;
>> udc->ep[5].maxpacket = 512;
>> - } else if (cpu_is_at91sam9261()) {
>> + } else if (cpu_is_at91sam9261() || cpu_is_at91sam9g10()) {
>> udc->ep[3].maxpacket = 64;
>> } else if (cpu_is_at91sam9263()) {
>> udc->ep[0].maxpacket = 64;
>> diff --git a/drivers/usb/host/ohci-at91.c b/drivers/usb/host/ohci-at91.c
>> index b29b0fe..fb64def 100644
>> --- a/drivers/usb/host/ohci-at91.c
>> +++ b/drivers/usb/host/ohci-at91.c
>> @@ -35,7 +35,7 @@ extern int usb_disabled(void);
>>
>> static void at91_start_clock(void)
>> {
>> - if (cpu_is_at91sam9261())
>> + if (cpu_is_at91sam9261() || cpu_is_at91sam9g10())
>> clk_enable(hclk);
>> clk_enable(iclk);
>> clk_enable(fclk);
>> @@ -46,7 +46,7 @@ static void at91_stop_clock(void)
>> {
>> clk_disable(fclk);
>> clk_disable(iclk);
>> - if (cpu_is_at91sam9261())
>> + if (cpu_is_at91sam9261() || cpu_is_at91sam9g10())
>> clk_disable(hclk);
>> clocked = 0;
>> }
>> @@ -142,7 +142,7 @@ static int usb_hcd_at91_probe(const struct hc_driver *driver,
>>
>> iclk = clk_get(&pdev->dev, "ohci_clk");
>> fclk = clk_get(&pdev->dev, "uhpck");
>> - if (cpu_is_at91sam9261())
>> + if (cpu_is_at91sam9261() || cpu_is_at91sam9g10())
>> hclk = clk_get(&pdev->dev, "hck0");
>>
>> at91_start_hc(pdev);
>> @@ -156,7 +156,7 @@ static int usb_hcd_at91_probe(const struct hc_driver *driver,
>> /* Error handling */
>> at91_stop_hc(pdev);
>>
>> - if (cpu_is_at91sam9261())
>> + if (cpu_is_at91sam9261() || cpu_is_at91sam9g10())
>> clk_put(hclk);
>> clk_put(fclk);
>> clk_put(iclk);
>> @@ -193,7 +193,7 @@ static void usb_hcd_at91_remove(struct usb_hcd *hcd,
>> release_mem_region(hcd->rsrc_start, hcd->rsrc_len);
>> usb_put_hcd(hcd);
>>
>> - if (cpu_is_at91sam9261())
>> + if (cpu_is_at91sam9261() || cpu_is_at91sam9g10())
>> clk_put(hclk);
>> clk_put(fclk);
>> clk_put(iclk);
>
>


--
Nicolas Ferre

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo DeleteThis @vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to top
David Brownell
External


Since: Mar 16, 2005
Posts: 463



PostPosted: Fri Sep 25, 2009 3:10 pm    Post subject: Re: [PATCH 4/5] at91/USB: USB drivers modifications for at91sam9g10 [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On Friday 25 September 2009, Nicolas Ferre wrote:
> Greg,
>
> Please, can you consider the inclusion of this patch. I have no news
> about it for a long time...

ISTR either acking this or suggesting it go with the rest
of the G10 patches ... regardless, seems OK to me now that
its precursors have merged.


> Here is a link to its patchwork entry:
> http://patchwork.kernel.org/patch/31173/
>
> Thanks for your help.
>
> Nicolas Ferre :
> > Hi,
> >
> > Here is a little "ping" about integration of this patch.
> >
> > Nicolas Ferre :
> >> From: Hong Xu <hong.xu.TakeThisOut@atmel.com>
> >>
> >> Modify both host and gadget USB drivers for at91sam9g10.
> >> This add a clock management equivalent to at91sam9261 on usb drivers.
> >> It also add the way of handling gadget pull-ups (like the at91sam9261).
> >
> > I wonder if we can consider its inclusion as at91sam9g10 is now
> > integrated in mainline.
> > Do you want me to split this in several pieces for host/gadget split.
> >
> > Thanks.
> >
> >> Signed-off-by: Hong Xu <hong.xu.TakeThisOut@atmel.com>
> >> Signed-off-by: Nicolas Ferre <nicolas.ferre.TakeThisOut@atmel.com>
> >> ---
> >> drivers/usb/gadget/at91_udc.c | 6 +++---
> >> drivers/usb/host/ohci-at91.c | 10 +++++-----
> >> 2 files changed, 8 insertions(+), 8 deletions(-)
> >>
> >> diff --git a/drivers/usb/gadget/at91_udc.c b/drivers/usb/gadget/at91_udc.c
> >> index 0b2bb8f..bfed3d9 100644
> >> --- a/drivers/usb/gadget/at91_udc.c
> >> +++ b/drivers/usb/gadget/at91_udc.c
> >> @@ -892,7 +892,7 @@ static void pullup(struct at91_udc *udc, int is_on)
> >>
> >> txvc |= AT91_UDP_TXVC_PUON;
> >> at91_udp_write(udc, AT91_UDP_TXVC, txvc);
> >> - } else if (cpu_is_at91sam9261()) {
> >> + } else if (cpu_is_at91sam9261() || cpu_is_at91sam9g10()) {
> >> u32 usbpucr;
> >>
> >> usbpucr = at91_sys_read(AT91_MATRIX_USBPUCR);
> >> @@ -910,7 +910,7 @@ static void pullup(struct at91_udc *udc, int is_on)
> >>
> >> txvc &= ~AT91_UDP_TXVC_PUON;
> >> at91_udp_write(udc, AT91_UDP_TXVC, txvc);
> >> - } else if (cpu_is_at91sam9261()) {
> >> + } else if (cpu_is_at91sam9261() || cpu_is_at91sam9g10()) {
> >> u32 usbpucr;
> >>
> >> usbpucr = at91_sys_read(AT91_MATRIX_USBPUCR);
> >> @@ -1692,7 +1692,7 @@ static int __init at91udc_probe(struct platform_device *pdev)
> >> udc->ep[3].maxpacket = 64;
> >> udc->ep[4].maxpacket = 512;
> >> udc->ep[5].maxpacket = 512;
> >> - } else if (cpu_is_at91sam9261()) {
> >> + } else if (cpu_is_at91sam9261() || cpu_is_at91sam9g10()) {
> >> udc->ep[3].maxpacket = 64;
> >> } else if (cpu_is_at91sam9263()) {
> >> udc->ep[0].maxpacket = 64;
> >> diff --git a/drivers/usb/host/ohci-at91.c b/drivers/usb/host/ohci-at91.c
> >> index b29b0fe..fb64def 100644
> >> --- a/drivers/usb/host/ohci-at91.c
> >> +++ b/drivers/usb/host/ohci-at91.c
> >> @@ -35,7 +35,7 @@ extern int usb_disabled(void);
> >>
> >> static void at91_start_clock(void)
> >> {
> >> - if (cpu_is_at91sam9261())
> >> + if (cpu_is_at91sam9261() || cpu_is_at91sam9g10())
> >> clk_enable(hclk);
> >> clk_enable(iclk);
> >> clk_enable(fclk);
> >> @@ -46,7 +46,7 @@ static void at91_stop_clock(void)
> >> {
> >> clk_disable(fclk);
> >> clk_disable(iclk);
> >> - if (cpu_is_at91sam9261())
> >> + if (cpu_is_at91sam9261() || cpu_is_at91sam9g10())
> >> clk_disable(hclk);
> >> clocked = 0;
> >> }
> >> @@ -142,7 +142,7 @@ static int usb_hcd_at91_probe(const struct hc_driver *driver,
> >>
> >> iclk = clk_get(&pdev->dev, "ohci_clk");
> >> fclk = clk_get(&pdev->dev, "uhpck");
> >> - if (cpu_is_at91sam9261())
> >> + if (cpu_is_at91sam9261() || cpu_is_at91sam9g10())
> >> hclk = clk_get(&pdev->dev, "hck0");
> >>
> >> at91_start_hc(pdev);
> >> @@ -156,7 +156,7 @@ static int usb_hcd_at91_probe(const struct hc_driver *driver,
> >> /* Error handling */
> >> at91_stop_hc(pdev);
> >>
> >> - if (cpu_is_at91sam9261())
> >> + if (cpu_is_at91sam9261() || cpu_is_at91sam9g10())
> >> clk_put(hclk);
> >> clk_put(fclk);
> >> clk_put(iclk);
> >> @@ -193,7 +193,7 @@ static void usb_hcd_at91_remove(struct usb_hcd *hcd,
> >> release_mem_region(hcd->rsrc_start, hcd->rsrc_len);
> >> usb_put_hcd(hcd);
> >>
> >> - if (cpu_is_at91sam9261())
> >> + if (cpu_is_at91sam9261() || cpu_is_at91sam9g10())
> >> clk_put(hclk);
> >> clk_put(fclk);
> >> clk_put(iclk);
> >
> >
>
>
> --
> Nicolas Ferre
>
>


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo.TakeThisOut@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to top
Display posts from previous:   
Post new topic   General Reply to Topic (not reply to a specific post)    Forums Home -> Kernel All times are: Eastern Time (US & Canada) (change)
Goto page 1, 2
Page 1 of 2

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum