The first 3 patches for U6715 after review
Subsystems (2)
Take into account comments around use of IOMEM from Russell King.
Regards
Philippe
PATCH 1/6 U6/U6715 ARM architecture files
--- arch/arm/Kconfig | 10 + arch/arm/Makefile | 2 + arch/arm/mach-u67xx/Kconfig | 11 + arch/arm/mach-u67xx/Makefile | 11 + arch/arm/mach-u67xx/Makefile.boot | 4 + arch/arm/mach-u67xx/board_u67xx_wavex.c | 47 +++ arch/arm/mach-u67xx/devices.c | 28 ++ arch/arm/plat-u6xxx/Kconfig | 20 + arch/arm/plat-u6xxx/Makefile | 8 + arch/arm/plat-u6xxx/include/mach/cpu.h | 36 ++ arch/arm/plat-u6xxx/include/mach/debug-macro.S | 38 ++ arch/arm/plat-u6xxx/include/mach/entry-macro.S | 32 ++ arch/arm/plat-u6xxx/include/mach/hardware.h | 41 +++ arch/arm/plat-u6xxx/include/mach/io.h | 30 ++ arch/arm/plat-u6xxx/include/mach/irqs.h | 102 ++++++ arch/arm/plat-u6xxx/include/mach/memory.h | 17 + arch/arm/plat-u6xxx/include/mach/regs-u6.h | 121 +++++++ arch/arm/plat-u6xxx/include/mach/system.h | 42 +++ arch/arm/plat-u6xxx/include/mach/timer.h | 16 + arch/arm/plat-u6xxx/include/mach/timex.h | 23 ++ arch/arm/plat-u6xxx/include/mach/uncompress.h | 50 +++ arch/arm/plat-u6xxx/include/mach/vmalloc.h | 10 + arch/arm/plat-u6xxx/io.c | 34 ++ arch/arm/plat-u6xxx/irq.c | 254 +++++++++++++ arch/arm/plat-u6xxx/timer.c | 455 ++++++++++++++++++++++++ 25 files changed, 1442 insertions(+), 0 deletions(-) create mode 100644 arch/arm/mach-u67xx/Kconfig create mode 100644 arch/arm/mach-u67xx/Makefile create mode 100644 arch/arm/mach-u67xx/Makefile.boot create mode 100644 arch/arm/mach-u67xx/board_u67xx_wavex.c create mode 100644 arch/arm/mach-u67xx/devices.c create mode 100644 arch/arm/plat-u6xxx/Kconfig create mode 100644 arch/arm/plat-u6xxx/Makefile create mode 100644 arch/arm/plat-u6xxx/include/mach/cpu.h create mode 100644 arch/arm/plat-u6xxx/include/mach/debug-macro.S create mode 100644 arch/arm/plat-u6xxx/include/mach/entry-macro.S create mode 100644 arch/arm/plat-u6xxx/include/mach/hardware.h create mode 100644 arch/arm/plat-u6xxx/include/mach/io.h create mode 100644 arch/arm/plat-u6xxx/include/mach/irqs.h create mode 100644 arch/arm/plat-u6xxx/include/mach/memory.h create mode 100644 arch/arm/plat-u6xxx/include/mach/regs-u6.h create mode 100644 arch/arm/plat-u6xxx/include/mach/system.h create mode 100644 arch/arm/plat-u6xxx/include/mach/timer.h create mode 100644 arch/arm/plat-u6xxx/include/mach/timex.h create mode 100644 arch/arm/plat-u6xxx/include/mach/uncompress.h create mode 100644 arch/arm/plat-u6xxx/include/mach/vmalloc.h create mode 100644 arch/arm/plat-u6xxx/io.c create mode 100644 arch/arm/plat-u6xxx/irq.c create mode 100644 arch/arm/plat-u6xxx/timer.c
arch/arm/Kconfig +10 -0
@@ -739,6 +739,13 @@ config ARCH_U300 help Support for ST-Ericsson U300 series mobile platforms. +config PLAT_U6XXX + bool "ST-Ericsson U6XXX Series" + select GENERIC_GPIO + select ARCH_REQUIRE_GPIOLIB + help + Support for ST-Ericsson's U6XXX architecture + config ARCH_U8500 bool "ST-Ericsson U8500 Series" select CPU_V7
@@ -910,6 +917,9 @@ source "arch/arm/mach-tegra/Kconfig" source "arch/arm/mach-u300/Kconfig" +source "arch/arm/plat-u6xxx/Kconfig" +source "arch/arm/mach-u67xx/Kconfig" + source "arch/arm/mach-ux500/Kconfig" source "arch/arm/mach-versatile/Kconfig"
arch/arm/Makefile +2 -0
@@ -176,6 +176,7 @@ machine-$(CONFIG_ARCH_STMP378X) := stmp378x machine-$(CONFIG_ARCH_STMP37XX) := stmp37xx machine-$(CONFIG_ARCH_TEGRA) := tegra machine-$(CONFIG_ARCH_U300) := u300 +machine-$(CONFIG_ARCH_U67XX) := u67xx machine-$(CONFIG_ARCH_U8500) := ux500 machine-$(CONFIG_ARCH_VERSATILE) := versatile machine-$(CONFIG_ARCH_VEXPRESS) := vexpress
@@ -200,6 +201,7 @@ plat-$(CONFIG_PLAT_PXA) := pxa plat-$(CONFIG_PLAT_S3C24XX) := s3c24xx samsung plat-$(CONFIG_PLAT_S5P) := s5p samsung plat-$(CONFIG_PLAT_SPEAR) := spear +plat-$(CONFIG_PLAT_U6XXX) := u6xxx plat-$(CONFIG_PLAT_VERSATILE) := versatile ifeq ($(CONFIG_ARCH_EBSA110),y)
arch/arm/mach-u67xx/Kconfig new file +11 -0
@@ -0,0 +1,11 @@ +comment "U67XX Board Type" + depends on ARCH_U67XX + +choice + prompt "Choose the U67XX Board type" + default MACH_U67XX_WAVEC_2GB + help + "Choose the ST-Ericsson Reference Design Board" + config MACH_U67XX_WAVEC_2GB + bool "U67XX WaveC Board with 2Gb Micron combo" +endchoice
arch/arm/mach-u67xx/Makefile new file +11 -0
@@ -0,0 +1,11 @@ +# +## Makefile for the linux kernel, hardware dependent part of ST-Ericsson U67xx +# +# +## Object file lists. + +# Common support +obj-y := devices.o + +# Specific board support +obj-$(CONFIG_MACH_U67XX_WAVEC_2GB) += board_u67xx_wavex.o
arch/arm/mach-u67xx/Makefile.boot new file +4 -0
@@ -0,0 +1,4 @@ + zreladdr-y := 0x20008000 +params_phys-y := 0x20000100 +initrd_phys-y := 0x26000000 +
arch/arm/mach-u67xx/board_u67xx_wavex.c new file +47 -0
47 lines not on this page · raw message
arch/arm/mach-u67xx/devices.c new file +28 -0
@@ -0,0 +1,28 @@ +/* +* linux/arch/arm/mach-u67xx/devices.c +* +* Copyright (C) ST-Ericsson SA 2010 +* Author: Philippe Langlais <[email protected]> for ST-Ericsson. +* License terms: GNU General Public License (GPL), version 2 +* +* Device specification for the U67XX +*/ + +#include <linux/kernel.h> +#include <linux/init.h> +#include <linux/device.h> +#include <linux/platform_device.h> + +/* list of devices */ +static struct platform_device *platform_devs[]__initdata = { +}; + +/* register generic devices */ + +static int __init u67xx_devices_init (void ) +{ +platform_add_devices (platform_devs,ARRAY_SIZE (platform_devs)); +return 0 ; +} + +arch_initcall (u67xx_devices_init);
arch/arm/plat-u6xxx/Kconfig new file +20 -0
@@ -0,0 +1,20 @@ +menu "STE U6XXX Implementations" + +choice + prompt "U67XX System Type" + default ARCH_U67XX + +config ARCH_U67XX + bool "U67XX" + select PLAT_U6XXX + select CPU_ARM926T + select GENERIC_TIME + select GENERIC_CLOCKEVENTS + select U6_MTU_TIMER +endchoice + +endmenu + +config U6_MTU_TIMER + bool + default y
arch/arm/plat-u6xxx/Makefile new file +8 -0
@@ -0,0 +1,8 @@ +# +# Makefile for the linux kernel hardware independant part of STE U6XXX. +# + +# Common support +obj-y := io.o irq.o + +obj-$(CONFIG_U6_MTU_TIMER) += timer.o
arch/arm/plat-u6xxx/include/mach/cpu.h new file +36 -0
@@ -0,0 +1,36 @@ +/* +* linux/arch/arm/plat-u6xxx/include/mach/cpu.h +* +* Copyright (C) ST-Ericsson SA 2010 +* Author: Philippe Langlais <[email protected]> for ST-Ericsson. +* License terms: GNU General Public License (GPL), version 2 +* U6 cpu type detection +*/ + +#ifndef __ASM_PLAT_CPU_H +#define __ASM_PLAT_CPU_H + +/* +* Macros to group U6xxx into cpu classes. +* These can be used in most places. +* cpu_is_u67xx(): True for U67XX +*/ + +#define GET_U6XXX_CLASS ((inl(SCON_SYSVER_REG)&0x0F00)>>8) +#define GET_U6XXX_SUBCLASS ((inl(SCON_SYSVER_REG)&0x0FF0)>>4) + +#define cpu_is_u67xx () 0 +#define cpu_is_u67xx_v2 () 0 +#define cpu_is_u67xx_v3 () 0 + +#if defined(CONFIG_ARCH_U67XX ) +# undef cpu_is_u67xx +# undef cpu_is_u67xx_v2 +# undef cpu_is_u67xx_v3 +# define cpu_is_u67xx () (GET_U6XXX_CLASS == 0x6) +# define cpu_is_u67xx_v2 () (GET_U6XXX_SUBCLASS == 0x62) +# define cpu_is_u67xx_v3 () (GET_U6XXX_SUBCLASS == 0x63) +#endif + +#endif /* __ASM_PLAT_CPU_H */ +
arch/arm/plat-u6xxx/include/mach/debug-macro.S new file +38 -0
@@ -0,0 +1,38 @@ +/* linux/arch/arm/plat-u6xxx/include/mach/debug-macro.S + * + * Debugging macro include header + * + * Copyright (C) 2010 ST-Ericsson + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * +*/ + +#include <mach/hardware.h> + + .macro addruart,rx + mrc p15, 0, \rx, c1, c0 + tst \rx, #1 @ MMU enabled? + ldreq \rx, = UART1_BASE @ physical base address + ldrne \rx, = IO_ADDRESS(UART1_BASE) @ virtual base + .endm + + .macro senduart,rd,rx + strb \rd, [\rx] + .endm + + .macro waituart,rd,rx +1001: + ldr \rd, [\rx, #20] + tst \rd, #1 << 5 @ LSR_THRE - 0 when full + beq 1001b + .endm + + .macro busyuart,rd,rx +1001: + ldr \rd, [\rx, #20] + tst \rd, #1 << 6 @ LSR_TEMT - 0 when busy + beq 1001b + .endm
arch/arm/plat-u6xxx/include/mach/entry-macro.S new file +32 -0
@@ -0,0 +1,32 @@ +/* + * linux/arch/arm/plat-u6xxx/include/mach/entry-macro.S + * + * Low-level IRQ helper macros for U6-based platforms + * Copyright (C) ST-Ericsson SA 2010 + * + * This file is licensed under the terms of the GNU General Public + * License version 2. This program is licensed "as is" without any + * warranty of any kind, whether express or implied. + */ +#include <mach/hardware.h> +#include <mach/irqs.h> + + .macro arch_ret_to_user, tmp1, tmp2 + .endm + + .macro disable_fiq + .endm + + .macro get_irqnr_preamble, base, tmp + ldr \base, =IO_ADDRESS(INTC_BASE) + .endm + + .macro get_irqnr_and_base, irqnr, irqstat, base, tmp + ldr \irqnr, [\base, #INTC_VECTOR_IRQ_OFFSET] @ load intc vector reg + mov \irqnr, \irqnr, lsr #3 @ Bits[0..2] are reserved + ands \irqnr, \irqnr, #0x00FF @ mask Bits[11..31] + .endm + + .macro irq_prio_table + .endm +
arch/arm/plat-u6xxx/include/mach/hardware.h new file +41 -0
41 lines not on this page · raw message
arch/arm/plat-u6xxx/include/mach/io.h new file +30 -0
@@ -0,0 +1,30 @@ +/* +* linux/arch/arm/plat-u6xxx/include/mach/io.h +* +* Copyright (C) ST-Ericsson SA 2010 +* Author: Philippe Langlais <[email protected]> for ST-Ericsson. +* License terms: GNU General Public License (GPL), version 2 +* +* Dummy IO map & IO definitions +*/ +#ifndef __ASM_ARM_ARCH_IO_H +#define __ASM_ARM_ARCH_IO_H + +#define IO_SPACE_LIMIT 0xffffffff + +#define __io (a) __typesafe_io(a) +#define __mem_pci (a) (a) + +/* +* I/O mapping +*/ +#ifdef __ASSEMBLER__ +#define IOMEM (x) (x) +#else +#define IOMEM (x) ((void __force __iomem *)(x)) +#endif +#define U6_IO_ADDRESS (pa) IOMEM(IO_ADDRESS(pa)) + +void u6xxx_map_io (void ); + +#endif /* __ASM_ARM_ARCH_IO_H */
arch/arm/plat-u6xxx/include/mach/irqs.h new file +102 -0
102 lines not on this page · raw message
arch/arm/plat-u6xxx/include/mach/memory.h new file +17 -0
@@ -0,0 +1,17 @@ +/* +* linux/arch/arm/plat-u6xxx/include/mach/memory.h +* +* Copyright (C) ST-Ericsson SA 2010 +* Author: Philippe Langlais <[email protected]> for ST-Ericsson. +* License terms: GNU General Public License (GPL), version 2 +*/ + +#ifndef __ASM_ARCH_MEMORY_H +#define __ASM_ARCH_MEMORY_H + +/* +* Physical DRAM offset. +*/ +#define PHYS_OFFSET UL(0x20000000) + +#endif
arch/arm/plat-u6xxx/include/mach/regs-u6.h new file +121 -0
121 lines not on this page · raw message
arch/arm/plat-u6xxx/include/mach/system.h new file +42 -0
42 lines not on this page · raw message
arch/arm/plat-u6xxx/include/mach/timer.h new file +16 -0
@@ -0,0 +1,16 @@ +/* +* linux/arch/arm/plat-u6xxx/include/mach/timer.h +* +* Copyright (C) ST-Ericsson SA 2010 +* Author: Philippe Langlais <[email protected]> for ST-Ericsson. +* License terms: GNU General Public License (GPL), version 2 +*/ + +#ifndef __PLAT_TIMER_H +#define __PLAT_TIMER_H + +struct sys_timer ; + +extern struct sys_timer u6_timer; + +#endif
arch/arm/plat-u6xxx/include/mach/timex.h new file +23 -0
@@ -0,0 +1,23 @@ +/* +* linux/arch/arm/plat-u6xxx/include/mach/timex.h +* +* Integrator architecture timex specifications +* +* Copyright (C) 1999 ARM Limited +* +* This program is free software; you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation; either version 2 of the License, or +* (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program; if not, write to the Free Software +* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ + +#define CLOCK_TICK_RATE (50000000 / 16)
arch/arm/plat-u6xxx/include/mach/uncompress.h new file +50 -0
50 lines not on this page · raw message
arch/arm/plat-u6xxx/include/mach/vmalloc.h new file +10 -0
@@ -0,0 +1,10 @@ +/* +* linux/arch/arm/plat-u6/include/mach/vmalloc.h +* Copyright (C) ST-Ericsson SA 2010 +* Author: Philippe Langlais <[email protected]> for ST-Ericsson. +* License terms: GNU General Public License (GPL), version 2 +* +* Virtual memory allocations +* End must be above the I/O registers and on an even 2MiB boundary. +*/ +#define VMALLOC_END 0xe8000000UL
arch/arm/plat-u6xxx/io.c new file +34 -0
@@ -0,0 +1,34 @@ +/* +* linux/arch/arm/plat-u6xxx/io.c +* +* Copyright (C) ST-Ericsson SA 2010 +* Author: Philippe Langlais <[email protected]> for ST-Ericsson. +* License terms: GNU General Public License (GPL), version 2 +*/ + +#include <linux/sched.h> +#include <linux/mm.h> +#include <linux/init.h> +#include <linux/io.h> + +#include <mach/hardware.h> +#include <asm/pgtable.h> +#include <asm/page.h> + +#include <asm/mach/map.h> + + +static struct map_desc u6xxx_io_desc[]__initdata = { + { + .virtual =IO_BASE_VIRT ,/* only peripherals */ + .pfn =__phys_to_pfn (IO_BASE_PHYS ), + .length =IO_SIZE , + .type =MT_DEVICE , + } +}; + +void __init u6xxx_map_io (void ) +{ +iotable_init (u6xxx_io_desc,ARRAY_SIZE (u6xxx_io_desc)); +} +
arch/arm/plat-u6xxx/irq.c new file +254 -0
254 lines not on this page · raw message
arch/arm/plat-u6xxx/timer.c new file +455 -0
455 lines not on this page · raw message
Signature · 1 line
1.7.1
PATCH 1/6 U6/U6715 ARM architecture files
Sorry, there's a few more points here.
Quoted 6 lines · Philippe Langlais
arch/arm/mach-u67xx/Kconfig new file +0
-0
arch/arm/mach-u67xx/Kconfig line 10
Quoted 10 lines
arch/arm/mach-u67xx/Kconfig new file +10
-0@@ -0,0 +1,11 @@ +comment "U67XX Board Type" + depends on ARCH_U67XX + +choice + prompt "Choose the U67XX Board type" + default MACH_U67XX_WAVEC_2GB + help + "Choose the ST-Ericsson Reference Design Board" + config MACH_U67XX_WAVEC_2GB + bool "U67XX WaveC Board with 2Gb Micron combo"
I thought convention here was to have the "config" statements all starting on column 1, and a blank line after 'help'. help shouldn't need the text quoted.
Quoted 20 lines
arch/arm/plat-u6xxx/Kconfig new file +14
-0@@ -0,0 +1,20 @@ +menu "STE U6XXX Implementations" + +choice + prompt "U67XX System Type" + default ARCH_U67XX + +config ARCH_U67XX + bool "U67XX" + select PLAT_U6XXX + select CPU_ARM926T + select GENERIC_TIME + select GENERIC_CLOCKEVENTS + select U6_MTU_TIMER +endchoice
...
Quoted 8 lines
arch/arm/Kconfig +0
-0@@ -739,6 +739,13 @@ config ARCH_U300 help Support for ST-Ericsson U300 series mobile platforms.
arch/arm/Kconfig config ARCH_U300 · line 751
Quoted 10 lines
arch/arm/Kconfig +7
-0+config PLAT_U6XXX + bool "ST-Ericsson U6XXX Series" + select GENERIC_GPIO + select ARCH_REQUIRE_GPIOLIB + help + Support for ST-Ericsson's U6XXX architecture + config ARCH_U8500 bool "ST-Ericsson U8500 Series" select CPU_V7
Hmm. So, we have PLAT_U6XXX to select support for the U6XXX platform series on the main machine class menu. We then have a globally visible ARCH_U67XX option, which selects PLAT_U6XXX, and that then gives us a MACH_U67XX_WAVEC_2GB option.
This seems to be rather obsure - what if I have some other machine class selected, and I enable ARCH_U67XX ?
How about having ARCH_U67XX in the main machine class menu, which allows us to see MACH_U67XX_WAVEC_2GB. When MACH_U67XX_WAVEC_2GB is enabled, this selects PLAT_U6XXX to pick up the plat-* stuff?
arch/arm/Kconfig
Quoted 11 lines
arch/arm/Kconfig +11
-0+static inline void arch_reset(char mode, const char *cmd) +{ + unsigned long flags; + /* + * To reset, we hit the on-board reset register + * in the system FPGA + */ + /* diasble HW interruption */ + raw_local_irq_save(flags); + /* load watchdog with reset value */ + outl(0x5, IO_ADDRESS(WDRU_BASE + WDRU_TIM_OFFSET));
s/outl/writel/ please.
Quoted 5 lines
arch/arm/plat-u6xxx/include/mach/uncompress.h new file +0
-0
...
arch/arm/plat-u6xxx/include/mach/uncompress.h line 36
Quoted 4 lines
arch/arm/plat-u6xxx/include/mach/uncompress.h new file +4
-0+static void putc (int c) +{ +if (c =='\n' ) +putc ('\r' );
Hmm, so you want to output \r\r\n for each \n in the output stream?
Quoted 5 lines
arch/arm/plat-u6xxx/timer.c new file +0
-0
...
arch/arm/plat-u6xxx/timer.c line 98
Quoted 2 lines
arch/arm/plat-u6xxx/timer.c new file +2
-0+struct mmtu_ctxt { +unsigned long *base;
__iomem ?
arch/arm/plat-u6xxx/timer.c line 99
Quoted 1 line
arch/arm/plat-u6xxx/timer.c new file +1
-0+int autoreload;
Is this a write-only variable? I couldn't find anything which reads it.
Quoted 5 lines
arch/arm/plat-u6xxx/timer.c new file +5
-0+uint32_t compvalue; +uint32_t endvalue; +struct clk *clk; +int mode; +};
...
arch/arm/plat-u6xxx/timer.c line 328
Quoted 5 lines
arch/arm/plat-u6xxx/timer.c new file +5
-0+case CLOCK_EVT_MODE_SHUTDOWN : + mmtu->autoreload =0 ; + +if (mmtu->clk ==NULL ) { + mmtu->clk =clk_get (0 ,"MMTU" );
clk_get(NULL, "MMTU")
arch/arm/plat-u6xxx/timer.c line 433
Quoted 5 lines
arch/arm/plat-u6xxx/timer.c new file +5
-0+struct sys_timer u6_timer = { + .init = u6_timer_init, +#ifndef CONFIG_GENERIC_TIME + .offset =NULL , +#endif
There's no need to initialize .offset, so this ifdef and initializer can be removed entirely.
PATCH 1/6 U6/U6715 ARM architecture files
Hi,
Quoted 3 lines · Russell King - ARM Linux
Sorry, there's a few more points here.
Never mind
Quoted 14 lines · Philippe Langlais
Quoted 13 lines
arch/arm/mach-u67xx/Kconfig new file +6
-0@@ -0,0 +1,11 @@ +comment "U67XX Board Type" + depends on ARCH_U67XX + +choice + prompt "Choose the U67XX Board type" + default MACH_U67XX_WAVEC_2GB
Quoted 10 lines
arch/arm/mach-u67xx/Kconfig line 10
Quoted 5 lines
arch/arm/mach-u67xx/Kconfig new file +4
-0+ help + "Choose the ST-Ericsson Reference Design Board" + config MACH_U67XX_WAVEC_2GB + bool "U67XX WaveC Board with 2Gb Micron combo"I thought convention here was to have the "config" statements all starting on column 1, and a blank line after 'help'. help shouldn't need the text quoted.
OK
Quoted 47 lines
Quoted 21 lines
arch/arm/plat-u6xxx/Kconfig new file +14
-0@@ -0,0 +1,20 @@ +menu "STE U6XXX Implementations" + +choice + prompt "U67XX System Type" + default ARCH_U67XX + +config ARCH_U67XX + bool "U67XX" + select PLAT_U6XXX + select CPU_ARM926T + select GENERIC_TIME + select GENERIC_CLOCKEVENTS + select U6_MTU_TIMER +endchoice...
Quoted 9 lines
arch/arm/Kconfig +0
-0@@ -739,6 +739,13 @@ config ARCH_U300 help Support for ST-Ericsson U300 series mobile platforms.arch/arm/Kconfig config ARCH_U300 · line 751
Quoted 10 lines
arch/arm/Kconfig +7
-0+config PLAT_U6XXX + bool "ST-Ericsson U6XXX Series" + select GENERIC_GPIO + select ARCH_REQUIRE_GPIOLIB + help + Support for ST-Ericsson's U6XXX architecture + config ARCH_U8500 bool "ST-Ericsson U8500 Series" select CPU_V7Hmm. So, we have
PLAT_U6XXXto select support for the U6XXX platform series on the main machine class menu. We then have a globally visibleARCH_U67XXoption, which selectsPLAT_U6XXX, and that then gives us aMACH_U67XX_WAVEC_2GBoption.
Quoted 8 lines
This seems to be rather obsure - what if I have some other machine class selected, and I enable
ARCH_U67XX?How about having
ARCH_U67XXin the main machine class menu, which allows us to seeMACH_U67XX_WAVEC_2GB. WhenMACH_U67XX_WAVEC_2GBis enabled, this selectsPLAT_U6XXXto pick up the plat-* stuff?
You're right, I fix that.
Quoted 5 lines
Quoted 5 lines
arch/arm/Kconfig +5
-0+static inline void arch_reset(char mode, const char *cmd) +{ + unsigned long flags; + /* + * To reset, we hit the on-board reset register
Quoted 9 lines
arch/arm/Kconfig
Quoted 7 lines
arch/arm/Kconfig +6
-0+ * in the system FPGA + */ + /* diasble HW interruption */ + raw_local_irq_save(flags); + /* load watchdog with reset value */ + outl(0x5, IO_ADDRESS(WDRU_BASE + WDRU_TIM_OFFSET));s/outl/writel/ please.
OK
Quoted 9 lines
Quoted 7 lines
arch/arm/plat-u6xxx/include/mach/uncompress.h new file +0
-0...
Quoted 7 lines
arch/arm/plat-u6xxx/include/mach/uncompress.h line 36
Quoted 5 lines
arch/arm/plat-u6xxx/include/mach/uncompress.h new file +4
-0+static void putc (int c) +{ +if (c =='\n' ) +putc ('\r' );Hmm, so you want to output \r\r\n for each \n in the output stream?
I removed these lines.
Quoted 9 lines
Quoted 7 lines
arch/arm/plat-u6xxx/timer.c new file +0
-0...
Quoted 5 lines
arch/arm/plat-u6xxx/timer.c line 98
Quoted 3 lines
arch/arm/plat-u6xxx/timer.c new file +2
-0+struct mmtu_ctxt { +unsigned long *base;
__iomem?
Yes
Quoted 6 lines
arch/arm/plat-u6xxx/timer.c line 99
Quoted 3 lines
arch/arm/plat-u6xxx/timer.c new file +1
-0+int autoreload;Is this a write-only variable? I couldn't find anything which reads it.
OK, it's a relicat of auto reload precedent implementation.
Quoted 8 lines
Quoted 6 lines
arch/arm/plat-u6xxx/timer.c new file +5
-0+uint32_t compvalue; +uint32_t endvalue; +struct clk *clk; +int mode; +};...
Quoted 8 lines
arch/arm/plat-u6xxx/timer.c line 328
Quoted 6 lines
arch/arm/plat-u6xxx/timer.c new file +5
-0+case CLOCK_EVT_MODE_SHUTDOWN : + mmtu->autoreload =0 ; + +if (mmtu->clk ==NULL ) { + mmtu->clk =clk_get (0 ,"MMTU" );clk_get(NULL, "MMTU")
OK
Quoted 10 lines
arch/arm/plat-u6xxx/timer.c line 433
Quoted 7 lines
arch/arm/plat-u6xxx/timer.c new file +5
-0+struct sys_timer u6_timer = { + .init = u6_timer_init, +#ifndef CONFIG_GENERIC_TIME + .offset =NULL , +#endifThere's no need to initialize .offset, so this ifdef and initializer can be removed entirely.
OK
A new U6 arch patch will be sent very soon.
Regards,
Philippe
PATCH 2/6 U6715 clocks gating management U6 clock generic driver & U6715 cgu clock specific
In reply to Philippe Langlais--- arch/arm/Kconfig | 1 + arch/arm/mach-u67xx/Makefile | 5 +- arch/arm/mach-u67xx/cgu.c | 753 +++++++++++++++++++++++++ arch/arm/mach-u67xx/cgu.h | 57 ++ arch/arm/mach-u67xx/clock_data_u67xx.c | 865 +++++++++++++++++++++++++++++ arch/arm/plat-u6xxx/Makefile | 2 +- arch/arm/plat-u6xxx/clock.c | 621 +++++++++++++++++++++ arch/arm/plat-u6xxx/include/mach/clkdev.h | 13 + arch/arm/plat-u6xxx/include/mach/clock.h | 378 +++++++++++++ 9 files changed, 2693 insertions(+), 2 deletions(-) create mode 100644 arch/arm/mach-u67xx/cgu.c create mode 100644 arch/arm/mach-u67xx/cgu.h create mode 100644 arch/arm/mach-u67xx/clock_data_u67xx.c create mode 100644 arch/arm/plat-u6xxx/clock.c create mode 100644 arch/arm/plat-u6xxx/include/mach/clkdev.h create mode 100644 arch/arm/plat-u6xxx/include/mach/clock.h
arch/arm/Kconfig +1 -0
@@ -741,6 +741,7 @@ config ARCH_U300 config PLAT_U6XXX bool "ST-Ericsson U6XXX Series" + select COMMON_CLKDEV select GENERIC_GPIO select ARCH_REQUIRE_GPIOLIB help
arch/arm/mach-u67xx/Makefile +4 -1
@@ -5,7 +5,10 @@ ## Object file lists. # Common support -obj-y := devices.o +obj-y := devices.o cgu.o + +# Specific machine support +obj-$(CONFIG_ARCH_U67XX) += clock_data_u67xx.o # Specific board support obj-$(CONFIG_MACH_U67XX_WAVEC_2GB) += board_u67xx_wavex.o
arch/arm/mach-u67xx/cgu.c new file +753 -0
753 lines not on this page · raw message
arch/arm/mach-u67xx/cgu.h new file +57 -0
57 lines not on this page · raw message
arch/arm/mach-u67xx/clock_data_u67xx.c new file +865 -0
865 lines not on this page · raw message
arch/arm/plat-u6xxx/Makefile +1 -1
@@ -3,6 +3,6 @@ # # Common support -obj-y := io.o irq.o +obj-y := io.o irq.o clock.o obj-$(CONFIG_U6_MTU_TIMER) += timer.o
arch/arm/plat-u6xxx/clock.c new file +621 -0
621 lines not on this page · raw message
arch/arm/plat-u6xxx/include/mach/clkdev.h new file +13 -0
@@ -0,0 +1,13 @@ +#ifndef __MACH_CLKDEV_H +#define __MACH_CLKDEV_H + +static inline int __clk_get (struct clk *clk) +{ +return 1 ; +} + +static inline void __clk_put (struct clk *clk) +{ +} + +#endif
arch/arm/plat-u6xxx/include/mach/clock.h new file +378 -0
378 lines not on this page · raw message
Signature · 1 line
1.7.1
PATCH 2/6 U6715 clocks gating management U6 clock generic driver & U6715 cgu clock specific
arch/arm/mach-u67xx/Makefile line 11
Quoted 13 lines · Philippe Langlais
arch/arm/mach-u67xx/Makefile +4
-1@@ -5,7 +5,10 @@ ## Object file lists. # Common support -obj-y := devices.o +obj-y := devices.o cgu.o + +# Specific machine support +obj-$(CONFIG_ARCH_U67XX) += clock_data_u67xx.o
Aren't we already using this makefile because CONFIG_ARCH_U67XX is set?
Quoted 4 lines
arch/arm/mach-u67xx/Makefile +4
-0+int u6_clk_set_parent_uart(struct clk *clk, struct clk *parent) +{ + + if (!strcmp(parent->name, "pclk2_ck")) {
arch/arm/mach-u67xx/Makefile
Quoted 10 lines
arch/arm/mach-u67xx/Makefile +10
-0+ clk->parent = parent; + return 0; + } else if (!strcmp(parent->name, "clk26m_ck")) { + clk->parent = parent; + return 0; + } else if (!strcmp(parent->name, "clk13m_ck")) { + clk->parent = parent; + return 0; + } else { + return -1;
Ouch. This will cause clk_set_parent() to return -1, which is -EPERM. I don't think you mean "operation not permitted". Maybe -ENOENT, -ENXIO, or -EINVAL would be more appropriate?
Quoted 5 lines
arch/arm/mach-u67xx/Makefile +5
-0+/* + * Standard clock functions defined in include/linux/clk.h + */ +int clk_enable(struct clk *clk) +{
arch/arm/mach-u67xx/Makefile
Quoted 10 lines
arch/arm/mach-u67xx/Makefile +10
-0+ unsigned long flags; + int ret = 0; + + if (clk == ERR_PTR(-ENOENT)) + return -EINVAL; + + spin_lock_irqsave(&clockfw_lock, flags); + if (arch_clock->clk_enable) + ret = arch_clock->clk_enable(clk); + spin_unlock_irqrestore(&clockfw_lock, flags);
Hmm. This looks like it's been modelled on OMAP.
Wouldn't it be better to move some of the U67xx stuff into here, such as the use-count tracking - rather than having each sub-arch reimplement it?
PATCH 2/6 U6715 clocks gating management U6 clock generic driver & U6715 cgu clock specific
-----Original Message-----
Quoted 14 lines
From: Russell King - ARM Linux [mailto:linux at arm.linux.org.uk]
Sent: Thursday, July 15, 2010 1:27 PM
To: Philippe LANGLAIS
Cc: linux-arm-kernel at lists.infradead.org;STEricsson_nomadik_linux; Loic PALLARDY; Vincent GUITTOT
Subject: Re: [PATCH 2/6] U6715 clocks gating management U6 clock generic driver & U6715 cgu clock specificQuoted 7 lines · Philippe Langlais
arch/arm/mach-u67xx/Makefile +0
-0@@ -5,7 +5,10 @@ ## Object file lists.
Quoted 9 lines
arch/arm/mach-u67xx/Makefile line 11
Quoted 6 lines
arch/arm/mach-u67xx/Makefile +4
-1# Common support -obj-y := devices.o +obj-y := devices.o cgu.o + +# Specific machine support +obj-$(CONFIG_ARCH_U67XX) += clock_data_u67xx.oAren't we already using this makefile because
CONFIG_ARCH_U67XXis set?
OK
Quoted 10 lines
Quoted 10 lines
arch/arm/mach-u67xx/Makefile +10
-0+int u6_clk_set_parent_uart(struct clk *clk, struct clk *parent) +{ + + if (!strcmp(parent->name, "pclk2_ck")) { + clk->parent = parent; + return 0; + } else if (!strcmp(parent->name, "clk26m_ck")) { + clk->parent = parent; + return 0; + } else if (!strcmp(parent->name, "clk13m_ck")) {
Quoted 8 lines
arch/arm/mach-u67xx/Makefile
Quoted 4 lines
arch/arm/mach-u67xx/Makefile +4
-0+ clk->parent = parent; + return 0; + } else { + return -1;Ouch. This will cause
clk_set_parent()to return -1, which is-EPERM. I don't think you mean "operation not permitted". Maybe-ENOENT,-ENXIO, or-EINVALwould be more appropriate?
Yes, we are going to use -EINVAL
Quoted 18 lines
Quoted 5 lines
arch/arm/mach-u67xx/Makefile +5
-0+/* + * Standard clock functions defined in include/linux/clk.h + */ +int clk_enable(struct clk *clk) +{arch/arm/mach-u67xx/Makefile
Quoted 10 lines
arch/arm/mach-u67xx/Makefile +10
-0+ unsigned long flags; + int ret = 0; + + if (clk == ERR_PTR(-ENOENT)) + return -EINVAL; + + spin_lock_irqsave(&clockfw_lock, flags); + if (arch_clock->clk_enable) + ret = arch_clock->clk_enable(clk); + spin_unlock_irqrestore(&clockfw_lock, flags);Hmm. This looks like it's been modelled on OMAP.
Quoted 4 lines
Wouldn't it be better to move some of the U67xx stuff into here, such as the use-count tracking - rather than having each sub-arch reimplement it?
You're right that it's been modelled on OMAP as described in the plat-pnx/clock.c file and we have 2 main reasons for not moving the use-count tracking into the platform part.
Some function such as the pnx_clk_enable function is calling itself with a finite length (6 stages) for updating the complete clock tree usecount and we don't want to have such kind of mechanism at such a higher level. The usecount management versus clock error management is also easier at this stage. The 2nd one is that we are at an integration step which prevents us from doing too much modification in our code for some regression risks
Regards,
Vincent
PATCH 3/6 U6715 gpio platform driver This driver is U6XXX platform generic
In reply to Philippe Langlais--- arch/arm/mach-u67xx/board_u67xx_wavex.c | 468 +++++++++++++++++++++ arch/arm/mach-u67xx/devices.c | 68 +++ arch/arm/plat-u6xxx/Makefile | 2 +- arch/arm/plat-u6xxx/gpio.c | 672 +++++++++++++++++++++++++++++++ arch/arm/plat-u6xxx/include/mach/gpio.h | 391 ++++++++++++++++++ arch/arm/plat-u6xxx/include/mach/scon.h | 123 ++++++ 6 files changed, 1723 insertions(+), 1 deletions(-) create mode 100644 arch/arm/plat-u6xxx/gpio.c create mode 100644 arch/arm/plat-u6xxx/include/mach/gpio.h create mode 100644 arch/arm/plat-u6xxx/include/mach/scon.h
arch/arm/mach-u67xx/board_u67xx_wavex.c +468 -0
@@ -23,6 +23,473 @@#include <mach/hardware.h> #include <mach/irqs.h> #include <mach/timer.h> +#include <mach/gpio.h> +#include <mach/scon.h> + +/** +* SCON initial settings +* Allows to define the PIN multiplexing for all the platform (Linux and Modem) +*/ +struct u6_scon_config u6_scon_init_config[SCON_REGISTER_NB ] = { + { +SCON_SYSMUX0_REG , +0 | + (GPIO_MODE_MUX0 << (2 * (GPIO_A0 &0xF ))) |/* FM IRQ */ + (GPIO_MODE_MUX1 << (2 * (GPIO_A1 &0xF ))) |/* UART 2 */ + (GPIO_MODE_MUX1 << (2 * (GPIO_A2 &0xF ))) |/* UART 2 */ + (GPIO_MODE_MUX0 << (2 * (GPIO_A3 &0xF ))) | + (GPIO_MODE_MUX3 << (2 * (GPIO_A4 &0xF ))) |/* SIMOFF_copy for modem */ + (GPIO_MODE_MUX0 << (2 * (GPIO_A5 &0xF ))) |/* for AGPS */ + (GPIO_MODE_MUX0 << (2 * (GPIO_A6 &0xF ))) |/* LCD backlight +-> ressource backligth*/ + (GPIO_MODE_MUX0 << (2 * (GPIO_A7 &0xF ))) |/* Bluetooth */ + (GPIO_MODE_MUX0 << (2 * (GPIO_A8 &0xF ))) |/* Reserved for mode DPWS*/ + (GPIO_MODE_MUX0 << (2 * (GPIO_A9 &0xF ))) |/* Reserved for mode DPWS*/ + (GPIO_MODE_MUX1 << (2 * (GPIO_A10 &0xF ))) |/* UART2 */ + (GPIO_MODE_MUX1 << (2 * (GPIO_A11 &0xF ))) |/* UART2 */ + (GPIO_MODE_MUX1 << (2 * (GPIO_A12 &0xF ))) |/* UART 1, configured +by boot, don't touch */ + (GPIO_MODE_MUX0 << (2 * (GPIO_A13 &0xF ))) |/* free */ + (GPIO_MODE_MUX0 << (2 * (GPIO_A14 &0xF ))) |/* PMU irq */ + (GPIO_MODE_MUX0 << (2 * (GPIO_A15 &0xF ))) + }, + { +SCON_SYSMUX1_REG , +0 | + (GPIO_MODE_MUX0 << (2 * (GPIO_A16 &0xF ))) |/* FCI data 3 */ + (GPIO_MODE_MUX0 << (2 * (GPIO_A17 &0xF ))) |/* free */ + (GPIO_MODE_MUX0 << (2 * (GPIO_A18 &0xF ))) |/* FCI data 2 */ + (GPIO_MODE_MUX0 << (2 * (GPIO_A19 &0xF ))) |/* FCI data 1 */ + (GPIO_MODE_MUX0 << (2 * (GPIO_A20 &0xF ))) |/* Cam Ligth copy */ + (GPIO_MODE_MUX0 << (2 * (GPIO_A21 &0xF ))) |/* RF on -> GPIO */ + (GPIO_MODE_MUX2 << (2 * (GPIO_A22 &0xF ))) |/* RF RF_DPN */ + (GPIO_MODE_MUX0 << (2 * (GPIO_A23 &0xF ))) |/* RF reset -> GPIO */ + (GPIO_MODE_MUX0 << (2 * (GPIO_A24 &0xF ))) |/* AGPS reset */ + (GPIO_MODE_MUX0 << (2 * (GPIO_A25 &0xF ))) |/* AGPS wake up */ + (GPIO_MODE_MUX0 << (2 * (GPIO_A26 &0xF ))) |/* free */ + (GPIO_MODE_MUX0 << (2 * (GPIO_A27 &0xF ))) |/* SPI1 */ + (GPIO_MODE_MUX0 << (2 * (GPIO_A28 &0xF ))) |/* SPI1 */ + (GPIO_MODE_MUX1 << (2 * (GPIO_A29 &0xF ))) |/* Audio IIS */ + (GPIO_MODE_MUX0 << (2 * (GPIO_A30 &0xF ))) |/* AGPS pwr on */ + (GPIO_MODE_MUX0 << (2 * (GPIO_A31 &0xF )))/* free */ + }, + { +SCON_SYSMUX2_REG , +0 | + (GPIO_MODE_MUX0 << (2 * (GPIO_B0 &0xF ))) |/* RF DD */ + (GPIO_MODE_MUX0 << (2 * (GPIO_B1 &0xF ))) |/* RF DU */ + (GPIO_MODE_MUX0 << (2 * (GPIO_B2 &0xF ))) |/* RF FSC */ + (GPIO_MODE_MUX0 << (2 * (GPIO_B3 &0xF ))) |/* RF DCL */ + (GPIO_MODE_MUX0 << (2 * (GPIO_B4 &0xF ))) |/* UART RTS1 -> console */ + (GPIO_MODE_MUX0 << (2 * (GPIO_B5 &0xF ))) |/* UART TXD1 -> console */ + (GPIO_MODE_MUX0 << (2 * (GPIO_B6 &0xF ))) |/* NFI ready -> for NFI */ + (GPIO_MODE_MUX0 << (2 * (GPIO_B7 &0xF ))) |/* VDE_EOFI -> VDE already +configured by splashscreen */ + (GPIO_MODE_MUX0 << (2 * (GPIO_B8 &0xF ))) |/* RFEN0 */ + (GPIO_MODE_MUX1 << (2 * (GPIO_B9 &0xF ))) |/* FCICMD -> for FCI */ + (GPIO_MODE_MUX1 << (2 * (GPIO_B10 &0xF ))) |/* FCICLK -> for FCI */ + (GPIO_MODE_MUX1 << (2 * (GPIO_B11 &0xF ))) |/* FCIDATA0 -> for FCI */ + (GPIO_MODE_MUX0 << (2 * (GPIO_B12 &0xF ))) |/* RFSIG6 */ + (GPIO_MODE_MUX0 << (2 * (GPIO_B13 &0xF ))) |/* RFSIG7 */ + (GPIO_MODE_MUX3 << (2 * (GPIO_B14 &0xF ))) | + (GPIO_MODE_MUX0 << (2 * (GPIO_B15 &0xF )))/* RFDATA */ + }, + { +SCON_SYSMUX3_REG , +0 + }, + { +SCON_SYSMUX4_REG , +0 | + (GPIO_MODE_MUX0 << (2 * (GPIO_C0 &0xF ))) |/* VDE */ + (GPIO_MODE_MUX0 << (2 * (GPIO_C1 &0xF ))) |/* VDE */ + (GPIO_MODE_MUX0 << (2 * (GPIO_C2 &0xF ))) |/* VDE */ + (GPIO_MODE_MUX0 << (2 * (GPIO_C3 &0xF ))) |/* VDE */ + (GPIO_MODE_MUX0 << (2 * (GPIO_C4 &0xF ))) |/* VDE */ + (GPIO_MODE_MUX0 << (2 * (GPIO_C5 &0xF ))) |/* VDE */ + (GPIO_MODE_MUX0 << (2 * (GPIO_C6 &0xF ))) |/* VDE */ + (GPIO_MODE_MUX0 << (2 * (GPIO_C7 &0xF ))) |/* VDE */ + (GPIO_MODE_MUX0 << (2 * (GPIO_C8 &0xF ))) |/* VDE */ + (GPIO_MODE_MUX0 << (2 * (GPIO_C9 &0xF ))) |/* VDE */ + (GPIO_MODE_MUX0 << (2 * (GPIO_C10 &0xF ))) |/* VDE */ +#ifdef CONFIG_EBI_BUS + (GPIO_MODE_MUX2 << (2 * (GPIO_C11 &0xF ))) |/* EBI_CS0 */ +#else + (GPIO_MODE_MUX0 << (2 * (GPIO_C11 &0xF ))) |/* VDE */ +#endif + (GPIO_MODE_MUX0 << (2 * (GPIO_C12 &0xF ))) |/* VDE */ + (GPIO_MODE_MUX0 << (2 * (GPIO_C13 &0xF ))) |/* VDE */ + (GPIO_MODE_MUX0 << (2 * (GPIO_C14 &0xF ))) |/* KCOL0 -> keypad */ + (GPIO_MODE_MUX0 << (2 * (GPIO_C15 &0xF )))/* KCOL1 -> keypad */ + + }, + { +SCON_SYSMUX5_REG , +0 | + (GPIO_MODE_MUX0 << (2 * (GPIO_C16 &0xF ))) |/* KCOL2 -> keypad */ + (GPIO_MODE_MUX0 << (2 * (GPIO_C17 &0xF ))) |/* KCOL3 -> keypad */ + (GPIO_MODE_MUX0 << (2 * (GPIO_C18 &0xF ))) |/* KCOL4 -> keypad */ + (GPIO_MODE_MUX0 << (2 * (GPIO_C19 &0xF ))) |/* KROW0 -> keypad */ + (GPIO_MODE_MUX0 << (2 * (GPIO_C20 &0xF ))) |/* KROW1 -> keypad */ + (GPIO_MODE_MUX0 << (2 * (GPIO_C21 &0xF ))) |/* KROW2 -> keypad */ + (GPIO_MODE_MUX0 << (2 * (GPIO_C22 &0xF ))) |/* KROW3 -> keypad */ + (GPIO_MODE_MUX0 << (2 * (GPIO_C23 &0xF ))) |/* KROW4 -> keypad */ + (GPIO_MODE_MUX0 << (2 * (GPIO_C24 &0xF ))) |/* RF3GSPIEN0 */ + (GPIO_MODE_MUX0 << (2 * (GPIO_C25 &0xF ))) |/* RF3GSPIDATA */ + (GPIO_MODE_MUX0 << (2 * (GPIO_C26 &0xF ))) |/* RF3GSPICLK */ + (GPIO_MODE_MUX0 << (2 * (GPIO_C27 &0xF ))) |/* RFSM_OUT0 */ + (GPIO_MODE_MUX0 << (2 * (GPIO_C28 &0xF ))) |/* RFSM_OUT1 */ + (GPIO_MODE_MUX0 << (2 * (GPIO_C29 &0xF ))) |/* RFSM_OUT2 */ + (GPIO_MODE_MUX1 << (2 * (GPIO_C30 &0xF ))) |/* I2C -> ressource */ + (GPIO_MODE_MUX1 << (2 * (GPIO_C31 &0xF )))/* I2C -> ressource */ + }, + { +SCON_SYSMUX6_REG , +0 | + (GPIO_MODE_MUX1 << (2 * (GPIO_D0 &0xF ))) |/* CAM PWRDN1 -> CAM */ + (GPIO_MODE_MUX0 << (2 * (GPIO_D1 &0xF ))) |/* CAM DATA 0 */ + (GPIO_MODE_MUX0 << (2 * (GPIO_D2 &0xF ))) |/* CAM DATA 1 */ + (GPIO_MODE_MUX0 << (2 * (GPIO_D3 &0xF ))) |/* CAM DATA 2 */ + (GPIO_MODE_MUX0 << (2 * (GPIO_D4 &0xF ))) |/* CAM DATA 3 */ + (GPIO_MODE_MUX0 << (2 * (GPIO_D5 &0xF ))) |/* CAM DATA 4 */ + (GPIO_MODE_MUX0 << (2 * (GPIO_D6 &0xF ))) |/* CAM DATA 5 */ + (GPIO_MODE_MUX0 << (2 * (GPIO_D7 &0xF ))) |/* CAM DATA 6 */ + (GPIO_MODE_MUX0 << (2 * (GPIO_D8 &0xF ))) |/* CAM DATA 7 */ + (GPIO_MODE_MUX0 << (2 * (GPIO_D9 &0xF ))) |/* CAM DATA 8 */ + (GPIO_MODE_MUX0 << (2 * (GPIO_D10 &0xF ))) |/* CAM DATA 9 */ + (GPIO_MODE_MUX0 << (2 * (GPIO_D11 &0xF ))) |/* CAMVS */ + (GPIO_MODE_MUX0 << (2 * (GPIO_D12 &0xF ))) |/* CAMHS */ + (GPIO_MODE_MUX0 << (2 * (GPIO_D13 &0xF ))) |/* CAMCLKI */ + (GPIO_MODE_MUX0 << (2 * (GPIO_D14 &0xF ))) |/* CAMCLKO */ + (GPIO_MODE_MUX2 << (2 * (GPIO_D15 &0xF )))/* VDDC2EN */ + }, + { +SCON_SYSMUX7_REG , +0 | + (GPIO_MODE_MUX0 << (2 * (GPIO_D16 &0xF ))) |/* RF3GGPO9 */ + (GPIO_MODE_MUX0 << (2 * (GPIO_D17 &0xF ))) |/* RF3GGPO8 */ + (GPIO_MODE_MUX1 << (2 * (GPIO_D18 &0xF ))) |/* FCI card detect, FCI */ + (GPIO_MODE_MUX2 << (2 * (GPIO_D19 &0xF ))) |/* CAM_Prelight copy, CAM*/ + (GPIO_MODE_MUX0 << (2 * (GPIO_D20 &0xF ))) |/* UART1 RXD1 -> Console */ + (GPIO_MODE_MUX0 << (2 * (GPIO_D21 &0xF ))) |/* DIISWS */ + (GPIO_MODE_MUX0 << (2 * (GPIO_D22 &0xF ))) |/* DIISSDO */ + (GPIO_MODE_MUX0 << (2 * (GPIO_D23 &0xF ))) |/* DIISCK */ + (GPIO_MODE_MUX1 << (2 * (GPIO_D24 &0xF ))) |/* GPIOD24 ->FM Reset */ + (GPIO_MODE_MUX2 << (2 * (GPIO_D25 &0xF ))) |/* RFSIG3 */ + (GPIO_MODE_MUX0 << (2 * (GPIO_D26 &0xF ))) |/* RF3GGPO6 */ + (GPIO_MODE_MUX0 << (2 * (GPIO_D27 &0xF ))) |/* RF3GGPO7 */ + (GPIO_MODE_MUX0 << (2 * (GPIO_D28 &0xF ))) |/* RF3GGPO5 */ + (GPIO_MODE_MUX1 << (2 * (GPIO_D29 &0xF ))) |/* GPIOD29 USB suspend */ + (GPIO_MODE_MUX0 << (2 * (GPIO_D30 &0xF ))) |/* RF3GGPO4 */ + (GPIO_MODE_MUX0 << (2 * (GPIO_D31 &0xF )))/* RFCLK */ + }, +#ifdef CONFIG_MACH_U67XX_V2_WAVEB_2GB +{ +SCON_SYSMUX8_REG , +0 | + (GPIO_MODE_MUX0 << (2 * (GPIO_E0 &0xF ))) |/* DEBUG */ + (GPIO_MODE_MUX0 << (2 * (GPIO_E1 &0xF ))) |/* DEBUG */ + (GPIO_MODE_MUX0 << (2 * (GPIO_E2 &0xF ))) |/* DEBUG */ + (GPIO_MODE_MUX0 << (2 * (GPIO_E3 &0xF ))) |/* DEBUG */ + (GPIO_MODE_MUX0 << (2 * (GPIO_E4 &0xF ))) |/* DEBUG */ + (GPIO_MODE_MUX0 << (2 * (GPIO_E5 &0xF ))) |/* DEBUG */ + (GPIO_MODE_MUX0 << (2 * (GPIO_E6 &0xF ))) |/* DEBUG */ + (GPIO_MODE_MUX0 << (2 * (GPIO_E7 &0xF ))) |/* DEBUG */ + (GPIO_MODE_MUX0 << (2 * (GPIO_E8 &0xF ))) |/* DEBUG */ + (GPIO_MODE_MUX0 << (2 * (GPIO_E9 &0xF ))) |/* DEBUG */ + (GPIO_MODE_MUX0 << (2 * (GPIO_E10 &0xF ))) |/* DEBUG */ + (GPIO_MODE_MUX0 << (2 * (GPIO_E11 &0xF ))) |/* DEBUG */ + (GPIO_MODE_MUX0 << (2 * (GPIO_E12 &0xF ))) |/* DEBUG */ + (GPIO_MODE_MUX0 << (2 * (GPIO_E13 &0xF ))) |/* DEBUG */ + (GPIO_MODE_MUX0 << (2 * (GPIO_E14 &0xF ))) |/* DEBUG */ + (GPIO_MODE_MUX0 << (2 * (GPIO_E15 &0xF )))/* DEBUG */ + }, + { +SCON_SYSMUX9_REG , +0 | + (GPIO_MODE_MUX0 << (2 * (GPIO_E16 &0xF ))) |/* DEBUG */ + (GPIO_MODE_MUX0 << (2 * (GPIO_E17 &0xF ))) |/* DEBUG */ + (GPIO_MODE_MUX0 << (2 * (GPIO_E18 &0xF ))) |/* DEBUG */ + (GPIO_MODE_MUX0 << (2 * (GPIO_E19 &0xF ))) |/* DEBUG */ + (GPIO_MODE_MUX0 << (2 * (GPIO_E20 &0xF ))) |/* DEBUG */ + (GPIO_MODE_MUX1 << (2 * (GPIO_E21 &0xF ))) |/* SDATO2 -> SPI2 */ + (GPIO_MODE_MUX1 << (2 * (GPIO_E22 &0xF ))) |/* SDATIN2 -> SPI2 */ + (GPIO_MODE_MUX1 << (2 * (GPIO_E23 &0xF ))) |/* SCLK2 -> SPI2 */ + (GPIO_MODE_MUX1 << (2 * (GPIO_E24 &0xF ))) |/* FCI_copy -> FCI */ + (GPIO_MODE_MUX1 << (2 * (GPIO_E25 &0xF ))) |/* FCI_copy -> FCI */ + (GPIO_MODE_MUX1 << (2 * (GPIO_E26 &0xF ))) |/* FCI_copy -> FCI */ + (GPIO_MODE_MUX1 << (2 * (GPIO_E27 &0xF ))) |/* FCI_copy -> FCI */ + (GPIO_MODE_MUX1 << (2 * (GPIO_E28 &0xF ))) |/* FCI_copy -> FCI */ + (GPIO_MODE_MUX1 << (2 * (GPIO_E29 &0xF ))) |/* FCI_copy +-> FCI USB suspend */ + (GPIO_MODE_MUX0 << (2 * (GPIO_E30 &0xF ))) |/* RFSM_OUT3 */ + (GPIO_MODE_MUX1 << (2 * (GPIO_E31 &0xF )))/* GPIO CAM */ + }, +#else +{ +SCON_SYSMUX8_REG , +0 | + (GPIO_MODE_MUX2 << (2 * (GPIO_E0 &0xF ))) |/* DEBUG */ + (GPIO_MODE_MUX2 << (2 * (GPIO_E1 &0xF ))) |/* DEBUG */ + (GPIO_MODE_MUX2 << (2 * (GPIO_E2 &0xF ))) |/* DEBUG */ + (GPIO_MODE_MUX2 << (2 * (GPIO_E3 &0xF ))) |/* DEBUG */ + (GPIO_MODE_MUX2 << (2 * (GPIO_E4 &0xF ))) |/* DEBUG */ + (GPIO_MODE_MUX2 << (2 * (GPIO_E5 &0xF ))) |/* DEBUG */ + (GPIO_MODE_MUX2 << (2 * (GPIO_E6 &0xF ))) |/* DEBUG */ + (GPIO_MODE_MUX2 << (2 * (GPIO_E7 &0xF ))) |/* DEBUG */ + (GPIO_MODE_MUX2 << (2 * (GPIO_E8 &0xF ))) |/* DEBUG */ + (GPIO_MODE_MUX2 << (2 * (GPIO_E9 &0xF ))) |/* DEBUG */ + (GPIO_MODE_MUX2 << (2 * (GPIO_E10 &0xF ))) |/* DEBUG */ + (GPIO_MODE_MUX2 << (2 * (GPIO_E11 &0xF ))) |/* DEBUG */ + (GPIO_MODE_MUX2 << (2 * (GPIO_E12 &0xF ))) |/* DEBUG */ + (GPIO_MODE_MUX2 << (2 * (GPIO_E13 &0xF ))) |/* DEBUG */ + (GPIO_MODE_MUX2 << (2 * (GPIO_E14 &0xF ))) |/* DEBUG */ + (GPIO_MODE_MUX2 << (2 * (GPIO_E15 &0xF )))/* DEBUG */ + }, + { +SCON_SYSMUX9_REG , +0 | + (GPIO_MODE_MUX2 << (2 * (GPIO_E16 &0xF ))) |/* DEBUG */ + (GPIO_MODE_MUX2 << (2 * (GPIO_E17 &0xF ))) |/* DEBUG */ + (GPIO_MODE_MUX2 << (2 * (GPIO_E18 &0xF ))) |/* DEBUG */ + (GPIO_MODE_MUX2 << (2 * (GPIO_E19 &0xF ))) |/* DEBUG */ + (GPIO_MODE_MUX2 << (2 * (GPIO_E20 &0xF ))) |/* DEBUG */ + (GPIO_MODE_MUX1 << (2 * (GPIO_E21 &0xF ))) |/* SDATO2 -> SPI2 */ + (GPIO_MODE_MUX1 << (2 * (GPIO_E22 &0xF ))) |/* SDATIN2 -> SPI2 */ + (GPIO_MODE_MUX1 << (2 * (GPIO_E23 &0xF ))) |/* SCLK2 -> SPI2 */ + (GPIO_MODE_MUX1 << (2 * (GPIO_E24 &0xF ))) |/* FCI_copy -> FCI */ + (GPIO_MODE_MUX1 << (2 * (GPIO_E25 &0xF ))) |/* FCI_copy -> FCI */ + (GPIO_MODE_MUX1 << (2 * (GPIO_E26 &0xF ))) |/* FCI_copy -> FCI */ + (GPIO_MODE_MUX1 << (2 * (GPIO_E27 &0xF ))) |/* FCI_copy -> FCI */ + (GPIO_MODE_MUX1 << (2 * (GPIO_E28 &0xF ))) |/* FCI_copy -> FCI */ + (GPIO_MODE_MUX1 << (2 * (GPIO_E29 &0xF ))) |/* FCI_copy +-> FCI USB suspend */ + (GPIO_MODE_MUX0 << (2 * (GPIO_E30 &0xF ))) |/* RFSM_OUT3 */ + (GPIO_MODE_MUX1 << (2 * (GPIO_E31 &0xF )))/* GPIO CAM */ + }, + +#endif + { +SCON_SYSMUX10_REG , +0 | +#ifdef CONFIG_EBI_BUS + (GPIO_MODE_MUX3 << (2 * (GPIO_F0 &0xF ))) |/* EBI_IO0_copy */ + (GPIO_MODE_MUX0 << (2 * (GPIO_F1 &0xF ))) |/* EBI_OE_RW_copy */ + (GPIO_MODE_MUX0 << (2 * (GPIO_F2 &0xF ))) |/* EBI_WE_E_copy */ +#else + (GPIO_MODE_MUX1 << (2 * (GPIO_F0 &0xF ))) |/* CAM_PWR_REG -> CAM */ + (GPIO_MODE_MUX1 << (2 * (GPIO_F1 &0xF ))) |/* AGPS FRAME_SYNC, AGPS */ + (GPIO_MODE_MUX0 << (2 * (GPIO_F2 &0xF ))) |/* free */ +#endif + (GPIO_MODE_MUX0 << (2 * (GPIO_F3 &0xF ))) |/* KCOL5 -> Keypad */ + (GPIO_MODE_MUX0 << (2 * (GPIO_F4 &0xF ))) |/* KCOL6 -> Keypad */ + (GPIO_MODE_MUX0 << (2 * (GPIO_F5 &0xF ))) |/* KCOL7 -> Keypad */ + (GPIO_MODE_MUX0 << (2 * (GPIO_F6 &0xF ))) |/* KROW5 -> Keypad */ + (GPIO_MODE_MUX0 << (2 * (GPIO_F7 &0xF ))) |/* KROW6 -> Keypad */ + (GPIO_MODE_MUX0 << (2 * (GPIO_F8 &0xF ))) |/* KROW7 -> Keypad */ + (GPIO_MODE_MUX1 << (2 * (GPIO_F9 &0xF ))) |/* eMMC_PDn -> FCI */ +#ifdef CONFIG_EBI_BUS + (GPIO_MODE_MUX3 << (2 * (GPIO_F10 &0xF ))) |/* VDE_CS0_copy */ + (GPIO_MODE_MUX3 << (2 * (GPIO_F11 &0xF ))) |/* EBI_IO1_copy */ + (GPIO_MODE_MUX3 << (2 * (GPIO_F12 &0xF ))) |/* EBI_IO2_copy */ + (GPIO_MODE_MUX3 << (2 * (GPIO_F13 &0xF ))) |/* EBI_IO3_copy */ + (GPIO_MODE_MUX3 << (2 * (GPIO_F14 &0xF ))) |/* EBI_IO4_copy */ + (GPIO_MODE_MUX3 << (2 * (GPIO_F15 &0xF )))/* EBI_IO5_copy */ +#else + (GPIO_MODE_MUX3 << (2 * (GPIO_F10 &0xF ))) |/* VDE */ + (GPIO_MODE_MUX0 << (2 * (GPIO_F11 &0xF ))) |/* VDE */ + (GPIO_MODE_MUX0 << (2 * (GPIO_F12 &0xF ))) |/* VDE */ + (GPIO_MODE_MUX0 << (2 * (GPIO_F13 &0xF ))) |/* VDE */ + (GPIO_MODE_MUX0 << (2 * (GPIO_F14 &0xF ))) |/* VDE */ + (GPIO_MODE_MUX0 << (2 * (GPIO_F15 &0xF )))/* VDE */ +#endif + }, + { +SCON_SYSMUX11_REG , +0 | +#ifdef CONFIG_EBI_BUS + (GPIO_MODE_MUX3 << (2 * (GPIO_F16 &0xF ))) |/* EBI_IO6_copy */ + (GPIO_MODE_MUX3 << (2 * (GPIO_F17 &0xF ))) |/* EBI_IO7_copy */ +#else + (GPIO_MODE_MUX0 << (2 * (GPIO_F16 &0xF ))) |/* VDE */ + (GPIO_MODE_MUX0 << (2 * (GPIO_F17 &0xF ))) |/* VDE */ +#endif + (GPIO_MODE_MUX0 << (2 * (GPIO_F18 &0xF )))/* NFI_CE_n -> NFI */ + }, +/* Configure PAD Value */ + { +SCON_SYSPAD0_REG , +0 | + (SCON_PAD_REPEATER << (2 * (GPIO_A0 &0xF ))) | + (SCON_PAD_REPEATER << (2 * (GPIO_A1 &0xF ))) | + (SCON_PAD_PLAIN_INPUT << (2 * (GPIO_A2 &0xF ))) | + (SCON_PAD_REPEATER << (2 * (GPIO_A3 &0xF ))) | + (SCON_PAD_PLAIN_INPUT << (2 * (GPIO_A4 &0xF ))) | + (SCON_PAD_REPEATER << (2 * (GPIO_A5 &0xF ))) | + (SCON_PAD_REPEATER << (2 * (GPIO_A6 &0xF ))) | + (SCON_PAD_REPEATER << (2 * (GPIO_A7 &0xF ))) | + (SCON_PAD_REPEATER << (2 * (GPIO_A8 &0xF ))) | + (SCON_PAD_REPEATER << (2 * (GPIO_A9 &0xF ))) | + (SCON_PAD_REPEATER << (2 * (GPIO_A10 &0xF ))) | + (SCON_PAD_REPEATER << (2 * (GPIO_A11 &0xF ))) | + (SCON_PAD_REPEATER << (2 * (GPIO_A12 &0xF ))) | + (SCON_PAD_REPEATER << (2 * (GPIO_A13 &0xF ))) | + (SCON_PAD_PLAIN_INPUT << (2 * (GPIO_A14 &0xF ))) | + (SCON_PAD_REPEATER << (2 * (GPIO_A15 &0xF ))) + }, + { +SCON_SYSPAD1_REG , +0 | + (SCON_PAD_PLAIN_INPUT << (2 * (GPIO_A16 &0xF ))) | + (SCON_PAD_REPEATER << (2 * (GPIO_A17 &0xF ))) | + (SCON_PAD_PLAIN_INPUT << (2 * (GPIO_A18 &0xF ))) | + (SCON_PAD_PLAIN_INPUT << (2 * (GPIO_A19 &0xF ))) | + (SCON_PAD_REPEATER << (2 * (GPIO_A20 &0xF ))) | + (SCON_PAD_REPEATER << (2 * (GPIO_A21 &0xF ))) | + (SCON_PAD_REPEATER << (2 * (GPIO_A22 &0xF ))) | + (SCON_PAD_REPEATER << (2 * (GPIO_A23 &0xF ))) | + (SCON_PAD_REPEATER << (2 * (GPIO_A24 &0xF ))) | + (SCON_PAD_REPEATER << (2 * (GPIO_A25 &0xF ))) | + (SCON_PAD_REPEATER << (2 * (GPIO_A26 &0xF ))) | + (SCON_PAD_REPEATER << (2 * (GPIO_A27 &0xF ))) | + (SCON_PAD_REPEATER << (2 * (GPIO_A28 &0xF ))) | + (SCON_PAD_REPEATER << (2 * (GPIO_A29 &0xF ))) | + (SCON_PAD_REPEATER << (2 * (GPIO_A30 &0xF ))) | + (SCON_PAD_REPEATER << (2 * (GPIO_A31 &0xF ))) + }, + { +SCON_SYSPAD2_REG , +0 | + (SCON_PAD_PULL_DOWN << (2 * (GPIO_B0 &0xF ))) | + (SCON_PAD_PULL_DOWN << (2 * (GPIO_B1 &0xF ))) | + (SCON_PAD_REPEATER << (2 * (GPIO_B2 &0xF ))) | + (SCON_PAD_REPEATER << (2 * (GPIO_B3 &0xF ))) | + (SCON_PAD_REPEATER << (2 * (GPIO_B4 &0xF ))) | + (SCON_PAD_REPEATER << (2 * (GPIO_B5 &0xF ))) | + (SCON_PAD_PLAIN_INPUT << (2 * (GPIO_B6 &0xF ))) | + (SCON_PAD_REPEATER << (2 * (GPIO_B7 &0xF ))) | + (SCON_PAD_REPEATER << (2 * (GPIO_B8 &0xF ))) | + (SCON_PAD_REPEATER << (2 * (GPIO_B9 &0xF ))) | + (SCON_PAD_REPEATER << (2 * (GPIO_B10 &0xF ))) | + (SCON_PAD_PLAIN_INPUT << (2 * (GPIO_B11 &0xF ))) | + (SCON_PAD_REPEATER << (2 * (GPIO_B12 &0xF ))) | + (SCON_PAD_REPEATER << (2 * (GPIO_B13 &0xF ))) | + (SCON_PAD_REPEATER << (2 * (GPIO_B14 &0xF ))) | + (SCON_PAD_REPEATER << (2 * (GPIO_B15 &0xF ))) + }, +}; + +/* GPIO def settings to avoid HW issue */ +struct u6_gpio_config u6_gpio_init_config[] = { +/* GPIO A bank */ + { + .gpio =GPIO_A5 , + .dir =GPIO_DIR_OUTPUT , + .value =1 , + }, + { + .gpio =GPIO_A6 , + .dir =GPIO_DIR_OUTPUT , + .value =1 , + }, + { + .gpio =GPIO_A7 , + .dir =GPIO_DIR_OUTPUT , + .value =0 , + }, + { + .gpio =GPIO_A8 , + .dir =GPIO_DIR_OUTPUT , + .value =1 , + }, + { + .gpio =GPIO_A9 , + .dir =GPIO_DIR_OUTPUT , + .value =1 , + }, + { + .gpio =GPIO_A13 , + .dir =GPIO_DIR_OUTPUT , + .value =0 , + }, + { + .gpio =GPIO_A17 , + .dir =GPIO_DIR_OUTPUT , + .value =0 , + }, + { + .gpio =GPIO_A21 , + .dir =GPIO_DIR_OUTPUT , + .value =0 , + }, + { + .gpio =GPIO_A23 , + .dir =GPIO_DIR_OUTPUT , + .value =0 , + }, + { + .gpio =GPIO_A24 , + .dir =GPIO_DIR_OUTPUT , + .value =1 , + }, + { + .gpio =GPIO_A25 , + .dir =GPIO_DIR_OUTPUT , + .value =0 , + }, + { + .gpio =GPIO_A30 , + .dir =GPIO_DIR_OUTPUT , + .value =0 , + }, +/* GPIO B bank */ +/* GPIO C bank */ +/* GPIO D bank */ + { + .gpio =GPIO_D0 , + .dir =GPIO_DIR_OUTPUT , + .value =0 , + }, + { + .gpio =GPIO_D24 , + .dir =GPIO_DIR_OUTPUT , + .value =0 , + }, + { + .gpio =GPIO_D29 , + .dir =GPIO_DIR_OUTPUT , + .value =0 , + }, +/* GPIO E bank */ + { + .gpio =GPIO_E31 , + .dir =GPIO_DIR_OUTPUT , + .value =0 , + }, +/* GPIO F bank */ + { + .gpio =GPIO_F0 , + .dir =GPIO_DIR_OUTPUT , + .value =0 , + }, + { + .gpio =GPIO_F1 , + .dir =GPIO_DIR_OUTPUT , + .value =0 , + }, + { + .gpio =GPIO_F2 , + .dir =GPIO_DIR_OUTPUT , + .value =0 , + }, + { + .gpio =GPIO_F9 , + .dir =GPIO_DIR_OUTPUT , + .value =0 , + } +}; + +u32 gpio_to_configure =ARRAY_SIZE (u6_gpio_init_config);/* List of board specific devices */ static struct platform_device *devices[]__initdata = {
@@ -30,6 +497,7 @@ static struct platform_device *devices[] __initdata = {void __init u67xx_init (void ) { +u6_gpio_init ();/* Add specific board devices */ platform_add_devices (devices,ARRAY_SIZE (devices)); }
arch/arm/mach-u67xx/devices.c +68 -0
78 lines not on this page · raw message
arch/arm/plat-u6xxx/Makefile +1 -1
@@ -3,6 +3,6 @@ # # Common support -obj-y := io.o irq.o clock.o +obj-y := io.o irq.o clock.o gpio.o obj-$(CONFIG_U6_MTU_TIMER) += timer.o
arch/arm/plat-u6xxx/gpio.c new file +672 -0
672 lines not on this page · raw message
arch/arm/plat-u6xxx/include/mach/gpio.h new file +391 -0
391 lines not on this page · raw message
arch/arm/plat-u6xxx/include/mach/scon.h new file +123 -0
123 lines not on this page · raw message
Signature · 1 line
1.7.1
PATCH 3/6 U6715 gpio platform driver This driver is U6XXX platform generic
Thanks, this is much better. Just a few remaining niggles.
arch/arm/mach-u67xx/board_u67xx_wavex.c line 26
Quoted 9 lines · Philippe Langlais
arch/arm/mach-u67xx/board_u67xx_wavex.c +1
-0@@ -23,6 +23,473 @@#include <mach/hardware.h> #include <mach/irqs.h> #include <mach/timer.h> +#include <mach/gpio.h>
Should be linux/gpio.h
Quoted 5 lines
arch/arm/mach-u67xx/devices.c +0
-0
arch/arm/mach-u67xx/devices.c line 20
Quoted 10 lines
arch/arm/mach-u67xx/devices.c +6
-0@@ -11,10 +11,78 @@#include <linux/kernel.h> #include <linux/init.h> #include <linux/device.h> +#include <linux/ioport.h> #include <linux/platform_device.h> +#include <linux/fs.h> +#include <linux/gpio.h> +#include <mach/hardware.h> +#include <mach/scon.h> +#include <mach/gpio.h>
You're already including linux/gpio.h, so this shouldn't be required.
Quoted 23 lines
arch/arm/plat-u6xxx/gpio.c new file +17
-0@@ -0,0 +1,672 @@ +/* +* linux/arch/arm/plat-u6xxx/gpio.c +* +* Copyright (C) ST-Ericsson SA 2010 +* Author: Loic Pallardy <[email protected]> for ST-Ericsson. +* License terms: GNU General Public License (GPL), version 2 +* Support functions for GPIO +*/ + +#include <linux/init.h> +#include <linux/kernel.h> +#include <linux/module.h> +#include <linux/platform_device.h> +#include <linux/sched.h> +#include <linux/interrupt.h> +#include <linux/ptrace.h> +#include <linux/sysdev.h>
arch/arm/plat-u6xxx/gpio.c line 27
Quoted 10 lines
arch/arm/plat-u6xxx/gpio.c new file +10
-0+#include <linux/err.h> +#include <linux/clk.h> +#include <linux/io.h> + +#include <asm/irq.h> +#include <asm/mach/irq.h> + +#include <mach/hardware.h> +#include <mach/irqs.h> +#include <mach/gpio.h>
linux/gpio.h again please.
arch/arm/plat-u6xxx/gpio.c line 663
Quoted 5 lines
arch/arm/plat-u6xxx/gpio.c new file +5
-0+static struct platform_driver u6_gpio_driver = { + .probe = u6_gpio_probe, + .remove =NULL , + .suspend =NULL , + .resume =NULL ,
NULL initializers aren't required.
arch/arm/plat-u6xxx/gpio.c line 666
Quoted 3 lines
arch/arm/plat-u6xxx/gpio.c new file +3
-0+ .driver = { + .name = "u6-gpio", + },
} should be aligned with the '.' of '.driver'.
Lastly, I'm confused by this in a few places:
local_irq_save(flags); writel(some value, register); local_irq_restore(flags);
Is there a reason why this apparantly simple register write need IRQs to be disabled?
I don't think this patch needs another review cycle, unless someone else wants to comment on it.
PATCH 3/6 U6715 gpio platform driver This driver is U6XXX platform generic
Hi,
I take into account all comments and I'll send a new U6 GPIO patch
Regards,
Philippe
Quoted 100 lines · Russell King - ARM Linux
Thanks, this is much better. Just a few remaining niggles.
arch/arm/mach-u67xx/board_u67xx_wavex.c line 27
Quoted 10 lines · Philippe Langlais
arch/arm/mach-u67xx/board_u67xx_wavex.c +1
-0@@ -23,6 +23,473 @@#include <mach/hardware.h> #include <mach/irqs.h> #include <mach/timer.h> +#include <mach/gpio.h> Should be
linux/gpio.hQuoted 6 lines
arch/arm/mach-u67xx/devices.c +0
-0@@ -11,10 +11,78 @@#include <linux/kernel.h> arch/arm/mach-u67xx/devices.c line 21
Quoted 10 lines
arch/arm/mach-u67xx/devices.c +6
-0#include <linux/init.h> #include <linux/device.h> +#include <linux/ioport.h> #include <linux/platform_device.h> +#include <linux/fs.h> +#include <linux/gpio.h> +#include <mach/hardware.h> +#include <mach/scon.h> +#include <mach/gpio.h> You're already including
linux/gpio.h, so this shouldn't be required.Quoted 24 lines
arch/arm/plat-u6xxx/gpio.c new file +17
-0@@ -0,0 +1,672 @@ +/* +* linux/arch/arm/plat-u6xxx/gpio.c +* +* Copyright (C) ST-Ericsson SA 2010 +* Author: Loic Pallardy<[email protected]> for ST-Ericsson. +* License terms: GNU General Public License (GPL), version 2 +* Support functions for GPIO +*/ + +#include <linux/init.h> +#include <linux/kernel.h> +#include <linux/module.h> +#include <linux/platform_device.h> +#include <linux/sched.h> +#include <linux/interrupt.h> +#include <linux/ptrace.h> +#include <linux/sysdev.h> arch/arm/plat-u6xxx/gpio.c line 27
Quoted 10 lines
arch/arm/plat-u6xxx/gpio.c new file +10
-0+#include <linux/err.h> +#include <linux/clk.h> +#include <linux/io.h> + +#include <asm/irq.h> +#include <asm/mach/irq.h> + +#include <mach/hardware.h> +#include <mach/irqs.h> +#include <mach/gpio.h>
linux/gpio.hagain please.arch/arm/plat-u6xxx/gpio.c line 663
Quoted 6 lines
arch/arm/plat-u6xxx/gpio.c new file +5
-0+static struct platform_driver u6_gpio_driver = { + .probe = u6_gpio_probe, + .remove =NULL , + .suspend =NULL , + .resume =NULL ,NULL initializers aren't required.
arch/arm/plat-u6xxx/gpio.c line 666
Quoted 4 lines
arch/arm/plat-u6xxx/gpio.c new file +3
-0+ .driver = { + .name = "u6-gpio", + },} should be aligned with the '.' of '.driver'.
Lastly, I'm confused by this in a few places:
local_irq_save(flags); writel(some value, register); local_irq_restore(flags);Is there a reason why this apparantly simple register write need IRQs to be disabled?
I don't think this patch needs another review cycle, unless someone else wants to comment on it.