U6/U6715 ARM architecture files, 2nd try
Philippe Langlais
Acked-by Linus WalleijHi,
Here my second try for ST-Ericsson U6715 & U6 familly ARM926ejs SoC. I take into account the too few remarks received from my first post. This patch series apply on latest linux-next tree.
Information on U6715 is here: http://www.stericsson.com/platforms/U6715.jsp
In hope to be merged in the next linux kernel.
Regards,
Philippe.
PATCH 1/6 U6/U6715 ARM architecture files
V2 after first internal review
--- 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 | 48 ++ arch/arm/mach-u67xx/devices.c | 95 ++++ 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 | 20 + arch/arm/plat-u6xxx/include/mach/irqs.h | 130 +++++ arch/arm/plat-u6xxx/include/mach/memory.h | 24 + arch/arm/plat-u6xxx/include/mach/platform.h | 15 + arch/arm/plat-u6xxx/include/mach/regs-u6.h | 121 +++++ arch/arm/plat-u6xxx/include/mach/scon.h | 121 +++++ arch/arm/plat-u6xxx/include/mach/system.h | 42 ++ arch/arm/plat-u6xxx/include/mach/timer.h | 24 + 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 | 231 ++++++++ arch/arm/plat-u6xxx/timer.c | 679 ++++++++++++++++++++++++ 27 files changed, 1880 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/platform.h create mode 100644 arch/arm/plat-u6xxx/include/mach/regs-u6.h create mode 100644 arch/arm/plat-u6xxx/include/mach/scon.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
@@ -741,6 +741,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/plat-stmp3xxx/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_SHMOBILE) := shmobile machine-$(CONFIG_ARCH_STMP378X) := stmp378x machine-$(CONFIG_ARCH_STMP37XX) := stmp37xx 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
@@ -201,6 +202,7 @@ plat-$(CONFIG_PLAT_S3C24XX) := s3c24xx samsung plat-$(CONFIG_PLAT_S5P) := s5p samsung plat-$(CONFIG_PLAT_SPEAR) := spear plat-$(CONFIG_PLAT_VERSATILE) := versatile +plat-$(CONFIG_PLAT_U6XXX) := u6xxx ifeq ($(CONFIG_ARCH_EBSA110),y) # This is what happens if you forget the IOCS16 line.
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 +48 -0
48 lines not on this page · raw message
arch/arm/mach-u67xx/devices.c new file +95 -0
95 lines not on this page · raw message
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 + .endm + + .macro get_irqnr_and_base, irqnr, irqstat, base, tmp + ldr \base, =IO_ADDRESS(INTC_BASE) + 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 +20 -0
@@ -0,0 +1,20 @@ +/* +* 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) + +void u67xx_map_io (void ); + +#endif /* __ASM_ARM_ARCH_IO_H */
arch/arm/plat-u6xxx/include/mach/irqs.h new file +130 -0
130 lines not on this page · raw message
arch/arm/plat-u6xxx/include/mach/memory.h new file +24 -0
@@ -0,0 +1,24 @@ +/* +* 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) +#define BOOT_PARAMS_OFFSET (PHYS_OFFSET + 0x100) + +/** +* CONSISTENT_DMA_SIZE: Size of DMA-consistent memory region. +* Must be multiple of 2M,between 2MB and 14MB inclusive +*/ +#define CONSISTENT_DMA_SIZE (SZ_2M) + +#endif
arch/arm/plat-u6xxx/include/mach/platform.h new file +15 -0
@@ -0,0 +1,15 @@ +/* +* linux/arch/arm/plat-u6xxx/include/mach/platform.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_PLATFORM_H +#define __ASM_ARCH_PLATFORM_H 1 + +#include <linux/types.h> +#include <mach/hardware.h> + +#endif /* __ASM_ARCH_PLATFORM_H */
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/scon.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 +24 -0
@@ -0,0 +1,24 @@ +/* +* 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 +#ifdef U6_TIMER_C +#define PUBLIC +#else +#define PUBLIC extern +#endif + +struct sys_timer ; + +PUBLIC struct sys_timer u6_timer; + +PUBLIC void __init u6_timer_init(void); + +#undef PUBLIC +#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 (PAGE_OFFSET + 0x28000000)
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 u67xx_io_desc[]__initdata = { + { + .virtual =IO_BASE_VIRT ,/* only peripherals */ + .pfn =__phys_to_pfn (IO_BASE_PHYS ), + .length =IO_SIZE , + .type =MT_DEVICE , + } +}; + +void __init u67xx_map_io (void ) +{ +iotable_init (u67xx_io_desc,ARRAY_SIZE (u67xx_io_desc)); +} +
arch/arm/plat-u6xxx/irq.c new file +231 -0
231 lines not on this page · raw message
arch/arm/plat-u6xxx/timer.c new file +679 -0
679 lines not on this page · raw message
Signature · 1 line
1.7.1
PATCH 1/6 U6/U6715 ARM architecture files
Quoted 15 lines · Philippe Langlais
arch/arm/mach-u67xx/devices.c new file +9
-0@@ -0,0 +1,95 @@ +/* +* 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 +*/
arch/arm/mach-u67xx/devices.c line 19
Quoted 10 lines
arch/arm/mach-u67xx/devices.c new file +10
-0+ +#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 <mach/hardware.h> +#include <mach/scon.h> +#include <mach/gpio.h>
linux/gpio.h
arch/arm/mach-u67xx/devices.c line 56
Quoted 7 lines
arch/arm/mach-u67xx/devices.c new file +7
-0+struct gpio_bank u6_gpio_bank[6 ] = { + {(void __iomem *)GPIOA_PINS_REG , (void __iomem *)SCON_SYSMUX0_REG }, + {(void __iomem *)GPIOB_PINS_REG , (void __iomem *)SCON_SYSMUX2_REG }, + {(void __iomem *)GPIOC_PINS_REG , (void __iomem *)SCON_SYSMUX4_REG }, + {(void __iomem *)GPIOD_PINS_REG , (void __iomem *)SCON_SYSMUX6_REG }, + {(void __iomem *)GPIOE_PINS_REG , (void __iomem *)SCON_SYSMUX8_REG }, + {(void __iomem *)GPIOF_PINS_REG , (void __iomem *)SCON_SYSMUX10_REG },
Would be nice to get rid of these casts - instead moving them to the point of definition instead - or maybe doing as other platforms do and defining an IOMEM() macro which does the cast and using that in the definitions.
iow, something like:
#define IOMEM(x) ((void __iomem *)(x))
#define GPIOA_PINS_REG IOMEM(whatever)
and if you need GPIOA_PINS_REG to be usable in assembly, arrange for the IOMEM() macro to handle that for you.
Quoted 17 lines
arch/arm/plat-u6xxx/include/mach/entry-macro.S new file +11
-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>
arch/arm/plat-u6xxx/include/mach/entry-macro.S line 21
Quoted 10 lines
arch/arm/plat-u6xxx/include/mach/entry-macro.S new file +10
-0+#include <mach/irqs.h> + + .macro arch_ret_to_user, tmp1, tmp2 + .endm + + .macro disable_fiq + .endm + + .macro get_irqnr_preamble, base, tmp + .endm
This macro is there to allow you to be a little more efficient - rather than reloading the base address of the interrupt controller each time around the interrupt handling loop, you can put it in the above macro to take it outside the loop.
arch/arm/plat-u6xxx/include/mach/entry-macro.S line 23
Quoted 2 lines
arch/arm/plat-u6xxx/include/mach/entry-macro.S new file +2
-0+#define hw_raw_local_irq_save raw_local_irq_save +#define hw_raw_local_irq_restore raw_local_irq_restore
What's the purpose of these additional aliases?
Quoted 24 lines
arch/arm/plat-u6xxx/include/mach/entry-macro.S new file +24
-0+/* INTC PRIOMASK_IRQ Register (32 bits) */ +#define INTC_PRIOMASK_IRQ_OFFSET 0x0 +#define INTC_PRIOMASK_IRQ_REG IO_ADDRESS(INTC_BASE + INTC_PRIOMASK_IRQ_OFFSET) + +/* INTC PRIOMASK_FIQ Register (32 bits) */ +#define INTC_PRIOMASK_FIQ_OFFSET 0x4 +#define INTC_PRIOMASK_FIQ_REG IO_ADDRESS(INTC_BASE + INTC_PRIOMASK_FIQ_OFFSET) + +/* INTC VECTOR_IRQ Register (32 bits) */ +#define INTC_VECTOR_IRQ_OFFSET 0x100 +#define INTC_VECTOR_IRQ_REG IO_ADDRESS(INTC_BASE + INTC_VECTOR_IRQ_OFFSET) + +/* INTC VECTOR_FIQ Register (32 bits) */ +#define INTC_VECTOR_FIQ_OFFSET 0x104 +#define INTC_VECTOR_FIQ_REG IO_ADDRESS(INTC_BASE + INTC_VECTOR_FIQ_OFFSET) + +/* INTC PENDING_* Registers (32 bits) */ +#define INTC_PENDING_1_OFFSET 0x200 +#define INTC_PENDING_2_OFFSET 0x204 +#define INTC_PENDING_3_OFFSET 0x208 +#define INTC_FEATURES_OFFSET 0x300 + +/* INTC REQUEST 64 Registers (32 bits) */ +#define INTC_REQUEST1_OFFSET 0x404
arch/arm/plat-u6xxx/include/mach/entry-macro.S
Quoted 10 lines
arch/arm/plat-u6xxx/include/mach/entry-macro.S new file +10
-0+#define INTC_REQUEST64_OFFSET 0x500 + +/* INTC MOD_ID Register (32 bits) */ +#define INTC_MOD_ID_OFFSET 0xFFC + +/* interrupt x [1..64] request configuration */ +#define INTC_REQUESTx(x) IO_ADDRESS(INTC_BASE+INTC_REQUEST1_OFFSET+(x-1)*4) + +/* EXTINTx [0..23] configuration register */ +#define EXTINT_CFGx(x) IO_ADDRESS(EXTINT_BASE+(x)*4)
Does it really make sense to export all these definitions to the entire kernel?
Quoted 12 lines
arch/arm/plat-u6xxx/include/mach/memory.h new file +6
-0@@ -0,0 +1,24 @@ +/* +* 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
arch/arm/plat-u6xxx/include/mach/memory.h line 16
Quoted 10 lines
arch/arm/plat-u6xxx/include/mach/memory.h new file +10
-0+*/ + +#ifndef __ASM_ARCH_MEMORY_H +#define __ASM_ARCH_MEMORY_H + +/* +* Physical DRAM offset. +*/ +#define PHYS_OFFSET UL(0x20000000) +#define BOOT_PARAMS_OFFSET (PHYS_OFFSET + 0x100)
Does it make sense to export this to the world?
arch/arm/plat-u6xxx/include/mach/memory.h line 22
Quoted 6 lines
arch/arm/plat-u6xxx/include/mach/memory.h new file +6
-0+ +/** +* CONSISTENT_DMA_SIZE: Size of DMA-consistent memory region. +* Must be multiple of 2M,between 2MB and 14MB inclusive +*/ +#define CONSISTENT_DMA_SIZE (SZ_2M)
It defaults to 2MB, so this definition is redundant.
Quoted 11 lines
arch/arm/plat-u6xxx/include/mach/platform.h new file +5
-0@@ -0,0 +1,15 @@ +/* +* linux/arch/arm/plat-u6xxx/include/mach/platform.h +* +* Copyright (C) ST-Ericsson SA 2010 +* Author: Philippe Langlais <[email protected]> for ST-Ericsson.
arch/arm/plat-u6xxx/include/mach/platform.h line 15
Quoted 10 lines
arch/arm/plat-u6xxx/include/mach/platform.h new file +10
-0+* License terms: GNU General Public License (GPL), version 2 +*/ + +#ifndef __ASM_ARCH_PLATFORM_H +#define __ASM_ARCH_PLATFORM_H 1 + +#include <linux/types.h> +#include <mach/hardware.h> + +#endif /* __ASM_ARCH_PLATFORM_H */
If there's nothing required in this file, it doesn't need to exist.
Quoted 11 lines
arch/arm/plat-u6xxx/include/mach/timer.h new file +5
-0@@ -0,0 +1,24 @@ +/* +* linux/arch/arm/plat-u6xxx/include/mach/timer.h +* +* Copyright (C) ST-Ericsson SA 2010 +* Author: Philippe Langlais <[email protected]> for ST-Ericsson.
arch/arm/plat-u6xxx/include/mach/timer.h line 15
Quoted 10 lines
arch/arm/plat-u6xxx/include/mach/timer.h new file +10
-0+* License terms: GNU General Public License (GPL), version 2 +*/ + +#ifndef __PLAT_TIMER_H +#define __PLAT_TIMER_H +#ifdef U6_TIMER_C +#define PUBLIC +#else +#define PUBLIC extern +#endif
Err, no - there's really no need for such hacks in C, and I can't find anywhere which defines U6_TIMER_C.
Quoted 16 lines
arch/arm/plat-u6xxx/include/mach/timer.h new file +9
-0+ +struct sys_timer ; + +PUBLIC struct sys_timer u6_timer; + +PUBLIC void __init u6_timer_init(void); + +#undef PUBLIC +#endif arch/arm/plat-u6xxx/include/mach/vmalloc.h new file +0
-0
arch/arm/plat-u6xxx/include/mach/vmalloc.h line 10
Quoted 10 lines
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 (PAGE_OFFSET + 0x28000000)
Is the upper limit of vmalloc space is dependent on PAGE_OFFSET? If not, then it shouldn't be using a calculation based upon that value.
Quoted 22 lines
arch/arm/plat-u6xxx/timer.c new file +16
-0@@ -0,0 +1,679 @@ +/* +* linux/arch/arm/plat-u6xxx/timer.c +* +* Copyright (C) ST-Ericsson SA 2010 +* Author: Vincent Guittot <[email protected]> for ST-Ericsson. +* License terms: GNU General Public License (GPL), version 2 +*/ + +#include <linux/types.h> +#include <linux/kernel.h> +#include <linux/err.h> +#include <linux/init.h> +#include <linux/io.h> + +#include <asm/mach/time.h> +
arch/arm/plat-u6xxx/timer.c line 26
Quoted 10 lines
arch/arm/plat-u6xxx/timer.c new file +10
-0+#include <mach/hardware.h> + +#include <asm/mach/irq.h> +#include <linux/interrupt.h> +#include <mach/irqs.h> + +#include <linux/clk.h> + +#include <linux/clocksource.h> +#include <linux/clockchips.h>
linux/ includes before asm/ includes. asm/ includes before mach/ includes please.
arch/arm/plat-u6xxx/timer.c line 47
Quoted 7 lines
arch/arm/plat-u6xxx/timer.c new file +7
-0+#undef U6_TIMER_DEBUG +#if defined(U6_TIMER_DEBUG ) +#define debug(fmt, args...) \ + printk(PKMOD fmt, ## args) +#else +#define debug(fmt, args...) +#endif
You could use pr_debug() instead, and define 'DEBUG' at the top of the file you want debug messages from.
Quoted 11 lines
arch/arm/plat-u6xxx/timer.c new file +11
-0+static irqreturn_t +u6_mmtu_timer_interrupt (int irq,void *dev_id,struct pt_regs *regs) +{ +uint8_t status, enable; +struct mmtu_ctxt *mmtu; + + mmtu =u6_mmtu_get_context (0 ); + + status =readl ((mmtu->base +MMTU_INT_OFFSET +MMTU_INT_STATUS_IDX )); + enable =readl ((mmtu->base +MMTU_INT_OFFSET +MMTU_INT_ENABLE_IDX )); +
arch/arm/plat-u6xxx/timer.c line 159
Quoted 10 lines
arch/arm/plat-u6xxx/timer.c new file +10
-0+debug ("mmtu_timer_interrupt %d\n" , status); + +if (status & enable &MMTU_IRQ_MASK ) { +struct clock_event_device *evt = &clockevent_mmtu; + +writel (MMTU_IRQ_MASK , (mmtu->base +MMTU_INT_OFFSET + +MMTU_INT_CLR_STAT_IDX )); + +if (mmtu->autoreload) +u6_mmtu_timer_start (mmtu->compvalue,0 );
If your hardware doesn't do reloadable timers, you're not supposed to emulate it. The generic time infrastructure contains all the code that's required to handle periodic timer interrupts with timers only capable of one-shot mode.
Quoted 242 lines
arch/arm/plat-u6xxx/timer.c new file +242
-0+else +writel (MMTU_IRQ_MASK , + (mmtu->base +MMTU_INT_OFFSET + +MMTU_INT_CLR_ENA_IDX )); + +if (evt->event_handler) + evt->event_handler (evt); + } +return IRQ_HANDLED ; +} + +static struct irqaction u6_mmtu_timer_irq = { + .name ="U6 MMTU timer Tick" , + .flags =IRQF_DISABLED , + .handler = (irq_handler_t ) u6_mmtu_timer_interrupt, +}; + +static inline void u6_mmtu_clk_enable (int id) +{ +struct mmtu_ctxt *mmtu =u6_mmtu_get_context (id); + +/* Clock Multimedia Timer Unit. +*/ +if ((mmtu->clk !=NULL ) && (mmtu->mode ==0 )) { +debug ("mmtu_clk_enable\n" ); + mmtu->mode =1 ; +clk_enable (mmtu->clk); + } +} + +static inline void u6_mmtu_clk_disable (int id) +{ +struct mmtu_ctxt *mmtu =u6_mmtu_get_context (id); + +/* Clock Multimedia Timer Unit. +*/ +if ((mmtu->clk !=NULL ) && (mmtu->mode ==1 )) { +debug ("mmtu_clk_disable\n" ); +clk_disable (mmtu->clk); + mmtu->mode =0 ; + } +} + +static inline int u6_mmtu_timer_start (unsigned long cycles,int id) +{ +struct mmtu_ctxt *mmtu =u6_mmtu_get_context (id); + +debug ("mmtu_timer_start %d\n" , cycles); +u6_mmtu_clk_enable (id); + +/* MMTU limitation : can't set a value smaller or equal to tcval + 1 */ + cycles = cycles <2 ?2 : cycles; + + mmtu->compvalue = cycles; + + mmtu->endvalue = mmtu->compvalue + +readl ((mmtu->base +MMTU_TCVAL_IDX )); + +writel (MMTU_IRQ_MASK , + (mmtu->base +MMTU_INT_OFFSET +MMTU_INT_CLR_STAT_IDX )); + +writel (mmtu->endvalue, (mmtu->base +MMTU_USED_MATCH_IDX )); + +writel (MMTU_IRQ_MASK , + (mmtu->base +MMTU_INT_OFFSET +MMTU_INT_SET_ENA_IDX )); + +/* the value has already expired */ +if ((mmtu->endvalue <=readl ((mmtu->base +MMTU_TCVAL_IDX ))) + && (mmtu->endvalue > mmtu->compvalue) + && !(readl ((mmtu->base +MMTU_INT_OFFSET + +MMTU_INT_STATUS_IDX )) &MMTU_IRQ_MASK )) +writel (MMTU_IRQ_MASK , (mmtu->base +MMTU_INT_OFFSET + +MMTU_INT_SET_STAT_IDX )); + +return 0 ; +} + +static int u6_mmtu_timer_init (int id,unsigned long reload, +unsigned long prescale,int over_it) +{ + +struct mmtu_ctxt *mmtu =u6_mmtu_get_context (id); + +debug ("mmtu_timer_init %d\n" , id); + +/* Enable clock */ +/* +u6_mmtu_clk_enable(id); +clk mngt not available yet +directly enable it +*/ + { +unsigned long flags; +unsigned long reg; +hw_raw_local_irq_save (flags); + reg =readl (CGU_GATESC2_REG ); + reg |=0x1 <<2 ; +writel (reg,CGU_GATESC2_REG ); +hw_raw_local_irq_restore (flags); + } + +/* Reset timer */ +/* reset control register */ +writel (0x0000 , (mmtu->base +MMTU_CON_IDX )); +writel (0x0002 , (mmtu->base +MMTU_CON_IDX )); +/* reset control register */ +writel (0x0000 , (mmtu->base +MMTU_CON_IDX )); + +/* clear whole enable irq register */ +writel (0xFF , (mmtu->base +MMTU_INT_OFFSET +MMTU_INT_CLR_ENA_IDX )); +/* clear whole status register */ +writel (0xFF , (mmtu->base +MMTU_INT_OFFSET +MMTU_INT_CLR_STAT_IDX )); + +/* reset pre-scaler reload register */ +writel (0x00000000 , (mmtu->base +MMTU_PRESCALER_IDX )); + +/* reset match control register */ +writel (0x0000 , (mmtu->base +MMTU_MATCH_CON_IDX )); +/* reset match 0 register */ +writel (0x00000000 , (mmtu->base +MMTU_MATCH0_IDX )); +/* reset match 1 register */ +writel (0x00000000 , (mmtu->base +MMTU_MATCH1_IDX )); + +/* Initialize timer */ +writel (prescale -1 , (mmtu->base +MMTU_PRESCALER_IDX )); +/* power of 2 system clock */ +writel (reload, (mmtu->base +MMTU_MATCH0_IDX )); + +/* enable counter register */ +writel (0x0001 , (mmtu->base +MMTU_CON_IDX )); + +/* clear whole status register */ +writel (0xFF , (mmtu->base +MMTU_INT_OFFSET +MMTU_INT_CLR_STAT_IDX )); + +if (id ==0 ) +setup_irq (IRQ_MMTU , &u6_mmtu_timer_irq); + +/* Disable clock */ +#ifndef U6_MMTU_CLOCK_SOURCE +u6_mmtu_clk_disable (id); +#endif +return 0 ; +} + +/*** MMTU Clock event device ***/ + +static int u6_mmtu_set_next_event (unsigned long cycles, +struct clock_event_device *evt) +{ +debug ("mmtu_set_next_event %d\n" , cycles); +u6_mmtu_timer_start (cycles,0 ); + +return 0 ; +} + +static void u6_mmtu_set_mode (enum clock_event_mode mode, +struct clock_event_device *evt) +{ +struct mmtu_ctxt *mmtu =u6_mmtu_get_context (0 ); +unsigned long reg; + +debug ("mmtu_set_mode %d\n" , mode); + +switch (mode) { +case CLOCK_EVT_MODE_UNUSED : +writel (MMTU_IRQ_MASK , + (mmtu->base +MMTU_INT_OFFSET +MMTU_INT_CLR_ENA_IDX )); +writel (MMTU_IRQ_MASK , + (mmtu->base +MMTU_INT_OFFSET +MMTU_INT_CLR_STAT_IDX )); + + reg =readl ((mmtu->base +MMTU_TCVAL_IDX )); +writel (reg -1 , (mmtu->base +MMTU_USED_MATCH_IDX )); + +#ifndef U6_MMTU_CLOCK_SOURCE +u6_mmtu_clk_disable (0 ); + +if (mmtu->clk !=NULL ) +clk_put (mmtu->clk); +#endif + mmtu->autoreload =0 ; +break ; +case CLOCK_EVT_MODE_SHUTDOWN : + mmtu->autoreload =0 ; + +if (mmtu->clk ==NULL ) { + mmtu->clk =clk_get (0 ,"MMTU" ); +if (IS_ERR (mmtu->clk)) + mmtu->clk =NULL ; + } + +writel (MMTU_IRQ_MASK , + (mmtu->base +MMTU_INT_OFFSET +MMTU_INT_CLR_STAT_IDX )); +writel (MMTU_IRQ_MASK , + (mmtu->base +MMTU_INT_OFFSET +MMTU_INT_SET_ENA_IDX )); +case CLOCK_EVT_MODE_ONESHOT : +case CLOCK_EVT_MODE_RESUME : + mmtu->autoreload =0 ; +break ; +case CLOCK_EVT_MODE_PERIODIC : +writel (MMTU_IRQ_MASK , + (mmtu->base +MMTU_INT_OFFSET +MMTU_INT_SET_ENA_IDX )); + mmtu->autoreload =1 ; +break ; + } +} + +static void u6_clockevent_init_mmtu (void ) +{ +printk (PKMOD "clockevent_init_mmtu\n" ); + +/* prescale 13Mhz -> 1Mhz */ +#ifndef U6_MMTU_CLOCK_SOURCE +u6_mmtu_timer_init (0 ,0 , (MMTU_SYS_FRQ /MMTU_ROOT_FRQ ),0 ); +#endif + +/* issue it is shorter than reality and generates spurious irq */ +/* clockevent_mmtu.mult = div_sc(MMTU_ROOT_FRQ, NSEC_PER_SEC, +* clockevent_mmtu.shift) + 1;*/ + clockevent_mmtu.mult = +div_sc (MMTU_ROOT_FRQ ,NSEC_PER_SEC , clockevent_mmtu.shift); + +/* clockevent_mmtu.max_delta_ns = div_sc(RELOAD_COUNTER_MMTU, +* clockevent_mmtu.mult, clockevent_mmtu.shift);*/ +/* In fact it is wider than the 32bits variable !!! */ + clockevent_mmtu.max_delta_ns =0xFFFFFFFF ; + +/* MMTU HW limitation: match register can't be set w/ tcval+1 */ +/* clockevent_mmtu.min_delta_ns = div_sc(1, clockevent_mmtu.mult, +* clockevent_mmtu.shift)+1;*/ + clockevent_mmtu.min_delta_ns = +div_sc (2 , clockevent_mmtu.mult, clockevent_mmtu.shift) +1 ; +/* avoid to much timer interrupt with 10us min between 2 irq */ +if (clockevent_mmtu.min_delta_ns <10000 ) + clockevent_mmtu.min_delta_ns =10000 ; +else if (clockevent_mmtu.max_delta_ns <10000 ) + clockevent_mmtu.min_delta_ns = clockevent_mmtu.max_delta_ns>>1 ; + + clockevent_mmtu.cpumask =get_cpu_mask (0 ); +clockevents_register_device (&clockevent_mmtu); + +u6_mmtu_set_next_event (MMTU_ROOT_FRQ /HZ , &clockevent_mmtu); +}
arch/arm/plat-u6xxx/timer.c line 411
Quoted 10 lines
arch/arm/plat-u6xxx/timer.c new file +10
-0+ +/*** MMTU Clock source device ***/ +#ifdef U6_MMTU_CLOCK_SOURCE + +static cycle_t u6_mmtu_read (struct clocksource *source) +{ +struct mmtu_ctxt *mmtu =u6_mmtu_get_context (0 ); + +return readl ((mmtu->base +MMTU_TCVAL_IDX )) & source->mask; +}
Clocksource read functions don't require the value masking.
Quoted 14 lines
arch/arm/plat-u6xxx/timer.c new file +14
-0+ +static void u6_clocksource_init_mmtu (void ) +{ +printk (PKMOD "clocksource_init_mmtu\n" ); + +if (MMTU_ROOT_FRQ >=1000000 ) + clocksource_mmtu.mult = +clocksource_khz2mult ((MMTU_ROOT_FRQ /1000 ), + clocksource_mmtu.shift); +else + clocksource_mmtu.mult =clocksource_hz2mult ((MMTU_ROOT_FRQ ), + clocksource_mmtu.shift); + +u6_mmtu_timer_init (0 ,0 , (MMTU_SYS_FRQ /MMTU_ROOT_FRQ ),0 );
arch/arm/plat-u6xxx/timer.c line 435
Quoted 10 lines
arch/arm/plat-u6xxx/timer.c new file +10
-0+ +clocksource_register (&clocksource_mmtu); +} + +unsigned long long u6_mmtu_time (void ) +{ +unsigned long long ticks64 =u6_mmtu_read (&clocksource_mmtu); + +return (ticks64 * clocksource_mmtu.mult) >> clocksource_mmtu.shift; +}
Can you explain the purpose of this function please, and why you export the ticks and value from this function via sysfs?
Quoted 46 lines
arch/arm/plat-u6xxx/timer.c new file +46
-0+#endif + +/*** SysFs interface ***/ +/***********************/ +#ifdef CONFIG_U6_POWER_SYSFS + +/*** Clock event sysfs interface **/ + +#define shows_one_evt (file_name, object) \ +static ssize_t show_##file_name##_evt \ +(struct kobject *kobj, char *buf) \ +{ \ + return sprintf(buf, "%s\n", clockevent_mmtu.object); \ +} + +#define showu_one_evt (file_name, object) \ +static ssize_t show_##file_name##_evt \ +(struct kobject *kobj, char *buf) \ +{ \ + return sprintf(buf, "%u\n", clockevent_mmtu.object); \ +} + +#define showlu_one_evt (file_name, object) \ +static ssize_t show_##file_name##_evt \ +(struct kobject *kobj, char *buf) \ +{ \ + return sprintf(buf, "%lu\n", clockevent_mmtu.object); \ +} + +#define storelu_one_evt (file_name, object) \ +static ssize_t store_##file_name##_evt \ +(struct kobject *kobj, const char *buf, size_t size) \ +{ \ + unsigned long object; \ + strict_strtoul(buf, 10, &object); \ + clockevent_mmtu.object = object; \ + return size; \ +} + +#define showx_one_evt (file_name, object) \ +static ssize_t show_##file_name##_evt \ +(struct kobject *kobj, char *buf) \ +{ \ + return sprintf(buf, "0x%x\n", clockevent_mmtu.object); \ +} +
arch/arm/plat-u6xxx/timer.c line 491
Quoted 10 lines
arch/arm/plat-u6xxx/timer.c new file +10
-0+shows_one_evt (name, name); +showu_one_evt (rating, rating); +showlu_one_evt (mult, mult); +#ifdef CONFIG_U6_TIMER_TUNE +storelu_one_evt (mult, mult); +#endif +showu_one_evt (shift, shift); +showx_one_evt (features, features); +showlu_one_evt (min_delta_ns, min_delta_ns); +showlu_one_evt (max_delta_ns, max_delta_ns);
Why do you want all these parameters exported to userspace? Maybe you should discuss your requirement here with the generic time people before submitting it?
PATCH 1/6 U6/U6715 ARM architecture files
Hi,
Many thanks for your comments.
Quoted 44 lines · Russell King - ARM Linux
Quoted 16 lines · Philippe Langlais
arch/arm/mach-u67xx/devices.c new file +9
-0@@ -0,0 +1,95 @@ +/* +* 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 +*/ arch/arm/mach-u67xx/devices.c line 19
Quoted 10 lines
arch/arm/mach-u67xx/devices.c new file +10
-0+ +#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 <mach/hardware.h> +#include <mach/scon.h> +#include <mach/gpio.h>
linux/gpio.harch/arm/mach-u67xx/devices.c line 56
Quoted 8 lines
arch/arm/mach-u67xx/devices.c new file +7
-0+struct gpio_bank u6_gpio_bank[6 ] = { + {(void __iomem *)GPIOA_PINS_REG , (void __iomem *)SCON_SYSMUX0_REG }, + {(void __iomem *)GPIOB_PINS_REG , (void __iomem *)SCON_SYSMUX2_REG }, + {(void __iomem *)GPIOC_PINS_REG , (void __iomem *)SCON_SYSMUX4_REG }, + {(void __iomem *)GPIOD_PINS_REG , (void __iomem *)SCON_SYSMUX6_REG }, + {(void __iomem *)GPIOE_PINS_REG , (void __iomem *)SCON_SYSMUX8_REG }, + {(void __iomem *)GPIOF_PINS_REG , (void __iomem *)SCON_SYSMUX10_REG },Would be nice to get rid of these casts - instead moving them to the point of definition instead - or maybe doing as other platforms do and defining an
IOMEM()macro which does the cast and using that in the definitions.
Quoted 10 lines
iow, something like:
#define IOMEM(x) ((void
__iomem*)(x))#define
GPIOA_PINS_REGIOMEM(whatever)and if you need
GPIOA_PINS_REGto be usable in assembly, arrange for theIOMEM()macro to handle that for you.
OK, it's already done in PATCH 5/6, I made a mistake at patch build. I'll delete GPIO stuff from this patch.
Quoted 24 lines
Quoted 24 lines
arch/arm/plat-u6xxx/include/mach/entry-macro.S new file +18
-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
Quoted 10 lines
arch/arm/plat-u6xxx/include/mach/entry-macro.S line 21
Quoted 4 lines
arch/arm/plat-u6xxx/include/mach/entry-macro.S new file +3
-0+ + .macro get_irqnr_preamble, base, tmp + .endmThis macro is there to allow you to be a little more efficient - rather than reloading the base address of the interrupt controller each time around the interrupt handling loop, you can put it in the above macro to take it outside the loop.
OK
Quoted 6 lines
arch/arm/plat-u6xxx/include/mach/entry-macro.S line 23
Quoted 3 lines
arch/arm/plat-u6xxx/include/mach/entry-macro.S new file +2
-0+#define hw_raw_local_irq_save raw_local_irq_save +#define hw_raw_local_irq_restore raw_local_irq_restoreWhat's the purpose of these additional aliases?
Necessary for our para-virtualized drivers, but not for normal kernel usage. Will be removed.
Quoted 29 lines
Quoted 29 lines
arch/arm/plat-u6xxx/include/mach/entry-macro.S new file +29
-0+/* INTC PRIOMASK_IRQ Register (32 bits) */ +#define INTC_PRIOMASK_IRQ_OFFSET 0x0 +#define INTC_PRIOMASK_IRQ_REG IO_ADDRESS(INTC_BASE + INTC_PRIOMASK_IRQ_OFFSET) + +/* INTC PRIOMASK_FIQ Register (32 bits) */ +#define INTC_PRIOMASK_FIQ_OFFSET 0x4 +#define INTC_PRIOMASK_FIQ_REG IO_ADDRESS(INTC_BASE + INTC_PRIOMASK_FIQ_OFFSET) + +/* INTC VECTOR_IRQ Register (32 bits) */ +#define INTC_VECTOR_IRQ_OFFSET 0x100 +#define INTC_VECTOR_IRQ_REG IO_ADDRESS(INTC_BASE + INTC_VECTOR_IRQ_OFFSET) + +/* INTC VECTOR_FIQ Register (32 bits) */ +#define INTC_VECTOR_FIQ_OFFSET 0x104 +#define INTC_VECTOR_FIQ_REG IO_ADDRESS(INTC_BASE + INTC_VECTOR_FIQ_OFFSET) + +/* INTC PENDING_* Registers (32 bits) */ +#define INTC_PENDING_1_OFFSET 0x200 +#define INTC_PENDING_2_OFFSET 0x204 +#define INTC_PENDING_3_OFFSET 0x208 +#define INTC_FEATURES_OFFSET 0x300 + +/* INTC REQUEST 64 Registers (32 bits) */ +#define INTC_REQUEST1_OFFSET 0x404 +#define INTC_REQUEST64_OFFSET 0x500 + +/* INTC MOD_ID Register (32 bits) */ +#define INTC_MOD_ID_OFFSET 0xFFC +
Quoted 10 lines
arch/arm/plat-u6xxx/include/mach/entry-macro.S
Quoted 6 lines
arch/arm/plat-u6xxx/include/mach/entry-macro.S new file +5
-0+/* interrupt x [1..64] request configuration */ +#define INTC_REQUESTx(x) IO_ADDRESS(INTC_BASE+INTC_REQUEST1_OFFSET+(x-1)*4) + +/* EXTINTx [0..23] configuration register */ +#define EXTINT_CFGx(x) IO_ADDRESS(EXTINT_BASE+(x)*4)Does it really make sense to export all these definitions to the entire kernel?
I'll try to move it into plat-u6xxx/irq.c
Quoted 16 lines
Quoted 16 lines
arch/arm/plat-u6xxx/include/mach/memory.h new file +10
-0@@ -0,0 +1,24 @@ +/* +* 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
Quoted 9 lines
arch/arm/plat-u6xxx/include/mach/memory.h line 16
Quoted 7 lines
arch/arm/plat-u6xxx/include/mach/memory.h new file +6
-0+ +/* +* Physical DRAM offset. +*/ +#define PHYS_OFFSET UL(0x20000000) +#define BOOT_PARAMS_OFFSET (PHYS_OFFSET + 0x100)Does it make sense to export this to the world?
I take our U300 as example, but I can change that.
Quoted 10 lines
arch/arm/plat-u6xxx/include/mach/memory.h line 22
Quoted 7 lines
arch/arm/plat-u6xxx/include/mach/memory.h new file +6
-0+ +/** +* CONSISTENT_DMA_SIZE: Size of DMA-consistent memory region. +* Must be multiple of 2M,between 2MB and 14MB inclusive +*/ +#define CONSISTENT_DMA_SIZE (SZ_2M)It defaults to 2MB, so this definition is redundant.
OK, no problem
Quoted 15 lines
Quoted 15 lines
arch/arm/plat-u6xxx/include/mach/platform.h new file +9
-0@@ -0,0 +1,15 @@ +/* +* linux/arch/arm/plat-u6xxx/include/mach/platform.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_PLATFORM_H
Quoted 10 lines
arch/arm/plat-u6xxx/include/mach/platform.h line 15
Quoted 7 lines
arch/arm/plat-u6xxx/include/mach/platform.h new file +6
-0+#define __ASM_ARCH_PLATFORM_H 1 + +#include <linux/types.h> +#include <mach/hardware.h> + +#endif /* __ASM_ARCH_PLATFORM_H */ If there's nothing required in this file, it doesn't need to exist.
OK
Quoted 16 lines
Quoted 16 lines
arch/arm/plat-u6xxx/include/mach/timer.h new file +10
-0@@ -0,0 +1,24 @@ +/* +* 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
Quoted 10 lines
arch/arm/plat-u6xxx/include/mach/timer.h line 15
Quoted 6 lines
arch/arm/plat-u6xxx/include/mach/timer.h new file +5
-0+#ifdef U6_TIMER_C +#define PUBLIC +#else +#define PUBLIC extern +#endif Err, no - there's really no need for such hacks in C, and I can't find anywhere which defines
U6_TIMER_C.
OK
Quoted 22 lines
Quoted 22 lines
arch/arm/plat-u6xxx/include/mach/timer.h new file +9
-0+ +struct sys_timer ; + +PUBLIC struct sys_timer u6_timer; + +PUBLIC void __init u6_timer_init(void); + +#undef PUBLIC +#endif arch/arm/plat-u6xxx/include/mach/vmalloc.h new file +5
-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
Quoted 10 lines
arch/arm/plat-u6xxx/include/mach/vmalloc.h line 10
Quoted 6 lines
arch/arm/plat-u6xxx/include/mach/vmalloc.h new file +5
-0+* +* Virtual memory allocations +* End must be above the I/O registers and on an even 2MiB boundary. +*/ +#define VMALLOC_END (PAGE_OFFSET + 0x28000000)Is the upper limit of vmalloc space is dependent on
PAGE_OFFSET? If not, then it shouldn't be using a calculation based upon that value.
OK
Quoted 27 lines
Quoted 27 lines
arch/arm/plat-u6xxx/timer.c new file +21
-0@@ -0,0 +1,679 @@ +/* +* linux/arch/arm/plat-u6xxx/timer.c +* +* Copyright (C) ST-Ericsson SA 2010 +* Author: Vincent Guittot<[email protected]> for ST-Ericsson. +* License terms: GNU General Public License (GPL), version 2 +*/ + +#include <linux/types.h> +#include <linux/kernel.h> +#include <linux/err.h> +#include <linux/init.h> +#include <linux/io.h> + +#include <asm/mach/time.h> + +#include <mach/hardware.h> + +#include <asm/mach/irq.h> +#include <linux/interrupt.h> +#include <mach/irqs.h>
Quoted 10 lines
arch/arm/plat-u6xxx/timer.c line 26
Quoted 6 lines
arch/arm/plat-u6xxx/timer.c new file +5
-0+ +#include <linux/clk.h> + +#include <linux/clocksource.h> +#include <linux/clockchips.h> linux/ includes before asm/ includes. asm/ includes before mach/ includes please.
OK
Quoted 11 lines
arch/arm/plat-u6xxx/timer.c line 47
Quoted 8 lines
arch/arm/plat-u6xxx/timer.c new file +7
-0+#undef U6_TIMER_DEBUG +#if defined(U6_TIMER_DEBUG ) +#define debug(fmt, args...) \ + printk(PKMOD fmt, ## args) +#else +#define debug(fmt, args...) +#endif You could use
pr_debug()instead, and define 'DEBUG' at the top of the file you want debug messages from.
OK
Quoted 19 lines
Quoted 19 lines
arch/arm/plat-u6xxx/timer.c new file +18
-0+static irqreturn_t +u6_mmtu_timer_interrupt (int irq,void *dev_id,struct pt_regs *regs) +{ +uint8_t status, enable; +struct mmtu_ctxt *mmtu; + + mmtu =u6_mmtu_get_context (0 ); + + status =readl ((mmtu->base +MMTU_INT_OFFSET +MMTU_INT_STATUS_IDX )); + enable =readl ((mmtu->base +MMTU_INT_OFFSET +MMTU_INT_ENABLE_IDX )); + +debug ("mmtu_timer_interrupt %d\n" , status); + +if (status& enable&MMTU_IRQ_MASK ) { +struct clock_event_device *evt =&clockevent_mmtu; + +writel (MMTU_IRQ_MASK , (mmtu->base +MMTU_INT_OFFSET + +MMTU_INT_CLR_STAT_IDX ));
Quoted 10 lines
arch/arm/plat-u6xxx/timer.c line 159
Quoted 4 lines
arch/arm/plat-u6xxx/timer.c new file +3
-0+ +if (mmtu->autoreload) +u6_mmtu_timer_start (mmtu->compvalue,0 );If your hardware doesn't do reloadable timers, you're not supposed to emulate it. The generic time infrastructure contains all the code that's required to handle periodic timer interrupts with timers only capable of one-shot mode.
We removed this code and it's works => OK
Quoted 247 lines
Quoted 247 lines
arch/arm/plat-u6xxx/timer.c new file +246
-0+else +writel (MMTU_IRQ_MASK , + (mmtu->base +MMTU_INT_OFFSET + +MMTU_INT_CLR_ENA_IDX )); + +if (evt->event_handler) + evt->event_handler (evt); + } +return IRQ_HANDLED ; +} + +static struct irqaction u6_mmtu_timer_irq = { + .name ="U6 MMTU timer Tick" , + .flags =IRQF_DISABLED , + .handler = (irq_handler_t ) u6_mmtu_timer_interrupt, +}; + +static inline void u6_mmtu_clk_enable (int id) +{ +struct mmtu_ctxt *mmtu =u6_mmtu_get_context (id); + +/* Clock Multimedia Timer Unit. +*/ +if ((mmtu->clk !=NULL )&& (mmtu->mode ==0 )) { +debug ("mmtu_clk_enable\n" ); + mmtu->mode =1 ; +clk_enable (mmtu->clk); + } +} + +static inline void u6_mmtu_clk_disable (int id) +{ +struct mmtu_ctxt *mmtu =u6_mmtu_get_context (id); + +/* Clock Multimedia Timer Unit. +*/ +if ((mmtu->clk !=NULL )&& (mmtu->mode ==1 )) { +debug ("mmtu_clk_disable\n" ); +clk_disable (mmtu->clk); + mmtu->mode =0 ; + } +} + +static inline int u6_mmtu_timer_start (unsigned long cycles,int id) +{ +struct mmtu_ctxt *mmtu =u6_mmtu_get_context (id); + +debug ("mmtu_timer_start %d\n" , cycles); +u6_mmtu_clk_enable (id); + +/* MMTU limitation : can't set a value smaller or equal to tcval + 1 */ + cycles = cycles<2 ?2 : cycles; + + mmtu->compvalue = cycles; + + mmtu->endvalue = mmtu->compvalue + +readl ((mmtu->base +MMTU_TCVAL_IDX )); + +writel (MMTU_IRQ_MASK , + (mmtu->base +MMTU_INT_OFFSET +MMTU_INT_CLR_STAT_IDX )); + +writel (mmtu->endvalue, (mmtu->base +MMTU_USED_MATCH_IDX )); + +writel (MMTU_IRQ_MASK , + (mmtu->base +MMTU_INT_OFFSET +MMTU_INT_SET_ENA_IDX )); + +/* the value has already expired */ +if ((mmtu->endvalue<=readl ((mmtu->base +MMTU_TCVAL_IDX ))) +&& (mmtu->endvalue> mmtu->compvalue) +&& !(readl ((mmtu->base +MMTU_INT_OFFSET + +MMTU_INT_STATUS_IDX ))&MMTU_IRQ_MASK )) +writel (MMTU_IRQ_MASK , (mmtu->base +MMTU_INT_OFFSET + +MMTU_INT_SET_STAT_IDX )); + +return 0 ; +} + +static int u6_mmtu_timer_init (int id,unsigned long reload, +unsigned long prescale,int over_it) +{ + +struct mmtu_ctxt *mmtu =u6_mmtu_get_context (id); + +debug ("mmtu_timer_init %d\n" , id); + +/* Enable clock */ +/* +u6_mmtu_clk_enable(id); +clk mngt not available yet +directly enable it +*/ + { +unsigned long flags; +unsigned long reg; +hw_raw_local_irq_save (flags); + reg =readl (CGU_GATESC2_REG ); + reg |=0x1 <<2 ; +writel (reg,CGU_GATESC2_REG ); +hw_raw_local_irq_restore (flags); + } + +/* Reset timer */ +/* reset control register */ +writel (0x0000 , (mmtu->base +MMTU_CON_IDX )); +writel (0x0002 , (mmtu->base +MMTU_CON_IDX )); +/* reset control register */ +writel (0x0000 , (mmtu->base +MMTU_CON_IDX )); + +/* clear whole enable irq register */ +writel (0xFF , (mmtu->base +MMTU_INT_OFFSET +MMTU_INT_CLR_ENA_IDX )); +/* clear whole status register */ +writel (0xFF , (mmtu->base +MMTU_INT_OFFSET +MMTU_INT_CLR_STAT_IDX )); + +/* reset pre-scaler reload register */ +writel (0x00000000 , (mmtu->base +MMTU_PRESCALER_IDX )); + +/* reset match control register */ +writel (0x0000 , (mmtu->base +MMTU_MATCH_CON_IDX )); +/* reset match 0 register */ +writel (0x00000000 , (mmtu->base +MMTU_MATCH0_IDX )); +/* reset match 1 register */ +writel (0x00000000 , (mmtu->base +MMTU_MATCH1_IDX )); + +/* Initialize timer */ +writel (prescale -1 , (mmtu->base +MMTU_PRESCALER_IDX )); +/* power of 2 system clock */ +writel (reload, (mmtu->base +MMTU_MATCH0_IDX )); + +/* enable counter register */ +writel (0x0001 , (mmtu->base +MMTU_CON_IDX )); + +/* clear whole status register */ +writel (0xFF , (mmtu->base +MMTU_INT_OFFSET +MMTU_INT_CLR_STAT_IDX )); + +if (id ==0 ) +setup_irq (IRQ_MMTU ,&u6_mmtu_timer_irq); + +/* Disable clock */ +#ifndef U6_MMTU_CLOCK_SOURCE +u6_mmtu_clk_disable (id); +#endif +return 0 ; +} + +/*** MMTU Clock event device ***/ + +static int u6_mmtu_set_next_event (unsigned long cycles, +struct clock_event_device *evt) +{ +debug ("mmtu_set_next_event %d\n" , cycles); +u6_mmtu_timer_start (cycles,0 ); + +return 0 ; +} + +static void u6_mmtu_set_mode (enum clock_event_mode mode, +struct clock_event_device *evt) +{ +struct mmtu_ctxt *mmtu =u6_mmtu_get_context (0 ); +unsigned long reg; + +debug ("mmtu_set_mode %d\n" , mode); + +switch (mode) { +case CLOCK_EVT_MODE_UNUSED : +writel (MMTU_IRQ_MASK , + (mmtu->base +MMTU_INT_OFFSET +MMTU_INT_CLR_ENA_IDX )); +writel (MMTU_IRQ_MASK , + (mmtu->base +MMTU_INT_OFFSET +MMTU_INT_CLR_STAT_IDX )); + + reg =readl ((mmtu->base +MMTU_TCVAL_IDX )); +writel (reg -1 , (mmtu->base +MMTU_USED_MATCH_IDX )); + +#ifndef U6_MMTU_CLOCK_SOURCE +u6_mmtu_clk_disable (0 ); + +if (mmtu->clk !=NULL ) +clk_put (mmtu->clk); +#endif + mmtu->autoreload =0 ; +break ; +case CLOCK_EVT_MODE_SHUTDOWN : + mmtu->autoreload =0 ; + +if (mmtu->clk ==NULL ) { + mmtu->clk =clk_get (0 ,"MMTU" ); +if (IS_ERR (mmtu->clk)) + mmtu->clk =NULL ; + } + +writel (MMTU_IRQ_MASK , + (mmtu->base +MMTU_INT_OFFSET +MMTU_INT_CLR_STAT_IDX )); +writel (MMTU_IRQ_MASK , + (mmtu->base +MMTU_INT_OFFSET +MMTU_INT_SET_ENA_IDX )); +case CLOCK_EVT_MODE_ONESHOT : +case CLOCK_EVT_MODE_RESUME : + mmtu->autoreload =0 ; +break ; +case CLOCK_EVT_MODE_PERIODIC : +writel (MMTU_IRQ_MASK , + (mmtu->base +MMTU_INT_OFFSET +MMTU_INT_SET_ENA_IDX )); + mmtu->autoreload =1 ; +break ; + } +} + +static void u6_clockevent_init_mmtu (void ) +{ +printk (PKMOD "clockevent_init_mmtu\n" ); + +/* prescale 13Mhz -> 1Mhz */ +#ifndef U6_MMTU_CLOCK_SOURCE +u6_mmtu_timer_init (0 ,0 , (MMTU_SYS_FRQ /MMTU_ROOT_FRQ ),0 ); +#endif + +/* issue it is shorter than reality and generates spurious irq */ +/* clockevent_mmtu.mult = div_sc(MMTU_ROOT_FRQ, NSEC_PER_SEC, +* clockevent_mmtu.shift) + 1;*/ + clockevent_mmtu.mult = +div_sc (MMTU_ROOT_FRQ ,NSEC_PER_SEC , clockevent_mmtu.shift); + +/* clockevent_mmtu.max_delta_ns = div_sc(RELOAD_COUNTER_MMTU, +* clockevent_mmtu.mult, clockevent_mmtu.shift);*/ +/* In fact it is wider than the 32bits variable !!! */ + clockevent_mmtu.max_delta_ns =0xFFFFFFFF ; + +/* MMTU HW limitation: match register can't be set w/ tcval+1 */ +/* clockevent_mmtu.min_delta_ns = div_sc(1, clockevent_mmtu.mult, +* clockevent_mmtu.shift)+1;*/ + clockevent_mmtu.min_delta_ns = +div_sc (2 , clockevent_mmtu.mult, clockevent_mmtu.shift) +1 ; +/* avoid to much timer interrupt with 10us min between 2 irq */ +if (clockevent_mmtu.min_delta_ns<10000 ) + clockevent_mmtu.min_delta_ns =10000 ; +else if (clockevent_mmtu.max_delta_ns<10000 ) + clockevent_mmtu.min_delta_ns = clockevent_mmtu.max_delta_ns>>1 ; + + clockevent_mmtu.cpumask =get_cpu_mask (0 ); +clockevents_register_device (&clockevent_mmtu); + +u6_mmtu_set_next_event (MMTU_ROOT_FRQ /HZ ,&clockevent_mmtu); +} + +/*** MMTU Clock source device ***/ +#ifdef U6_MMTU_CLOCK_SOURCE +
Quoted 9 lines
arch/arm/plat-u6xxx/timer.c line 411
Quoted 7 lines
arch/arm/plat-u6xxx/timer.c new file +6
-0+static cycle_t u6_mmtu_read (struct clocksource *source) +{ +struct mmtu_ctxt *mmtu =u6_mmtu_get_context (0 ); + +return readl ((mmtu->base +MMTU_TCVAL_IDX ))& source->mask; +}Clocksource read functions don't require the value masking.
OK
Quoted 20 lines
Quoted 20 lines
arch/arm/plat-u6xxx/timer.c new file +19
-0+ +static void u6_clocksource_init_mmtu (void ) +{ +printk (PKMOD "clocksource_init_mmtu\n" ); + +if (MMTU_ROOT_FRQ >=1000000 ) + clocksource_mmtu.mult = +clocksource_khz2mult ((MMTU_ROOT_FRQ /1000 ), + clocksource_mmtu.shift); +else + clocksource_mmtu.mult =clocksource_hz2mult ((MMTU_ROOT_FRQ ), + clocksource_mmtu.shift); + +u6_mmtu_timer_init (0 ,0 , (MMTU_SYS_FRQ /MMTU_ROOT_FRQ ),0 ); + +clocksource_register (&clocksource_mmtu); +} + +unsigned long long u6_mmtu_time (void )
Quoted 9 lines
arch/arm/plat-u6xxx/timer.c line 435
Quoted 6 lines
arch/arm/plat-u6xxx/timer.c new file +5
-0+{ +unsigned long long ticks64 =u6_mmtu_read (&clocksource_mmtu); + +return (ticks64 * clocksource_mmtu.mult)>> clocksource_mmtu.shift; +}Can you explain the purpose of this function please, and why you export the ticks and value from this function via sysfs?
It's for debug purpose, can be removed for standard kernel.
Quoted 53 lines
Quoted 53 lines
arch/arm/plat-u6xxx/timer.c new file +52
-0+#endif + +/*** SysFs interface ***/ +/***********************/ +#ifdef CONFIG_U6_POWER_SYSFS + +/*** Clock event sysfs interface **/ + +#define shows_one_evt (file_name, object) \ +static ssize_t show_##file_name##_evt \ +(struct kobject *kobj, char *buf) \ +{ \ + return sprintf(buf, "%s\n", clockevent_mmtu.object); \ +} + +#define showu_one_evt (file_name, object) \ +static ssize_t show_##file_name##_evt \ +(struct kobject *kobj, char *buf) \ +{ \ + return sprintf(buf, "%u\n", clockevent_mmtu.object); \ +} + +#define showlu_one_evt (file_name, object) \ +static ssize_t show_##file_name##_evt \ +(struct kobject *kobj, char *buf) \ +{ \ + return sprintf(buf, "%lu\n", clockevent_mmtu.object); \ +} + +#define storelu_one_evt (file_name, object) \ +static ssize_t store_##file_name##_evt \ +(struct kobject *kobj, const char *buf, size_t size) \ +{ \ + unsigned long object; \ + strict_strtoul(buf, 10,&object); \ + clockevent_mmtu.object = object; \ + return size; \ +} + +#define showx_one_evt (file_name, object) \ +static ssize_t show_##file_name##_evt \ +(struct kobject *kobj, char *buf) \ +{ \ + return sprintf(buf, "0x%x\n", clockevent_mmtu.object); \ +} + +shows_one_evt (name, name); +showu_one_evt (rating, rating); +showlu_one_evt (mult, mult); +#ifdef CONFIG_U6_TIMER_TUNE +storelu_one_evt (mult, mult); +#endif
Quoted 9 lines
arch/arm/plat-u6xxx/timer.c line 491
Quoted 5 lines
arch/arm/plat-u6xxx/timer.c new file +4
-0+showu_one_evt (shift, shift); +showx_one_evt (features, features); +showlu_one_evt (min_delta_ns, min_delta_ns); +showlu_one_evt (max_delta_ns, max_delta_ns);Why do you want all these parameters exported to userspace? Maybe you should discuss your requirement here with the generic time people before submitting it?
For debug only => removed all
I'll fix this patch next week and send it to the list.
Regards,
Philippe
PATCH 2/6 U6715 clocks gating management U6 clock generic driver & U6715 cgu clock specific (V2)
In reply to Philippe Langlais--- arch/arm/mach-u67xx/Makefile | 2 +- arch/arm/mach-u67xx/cgu.c | 760 ++++++++++++++++++++++++++ arch/arm/mach-u67xx/clock_u67xx.h | 876 ++++++++++++++++++++++++++++++ arch/arm/plat-u6xxx/Makefile | 2 +- arch/arm/plat-u6xxx/clock.c | 650 ++++++++++++++++++++++ arch/arm/plat-u6xxx/include/mach/clock.h | 376 +++++++++++++ arch/arm/plat-u6xxx/timer.c | 1 + 7 files changed, 2665 insertions(+), 2 deletions(-) create mode 100644 arch/arm/mach-u67xx/cgu.c create mode 100644 arch/arm/mach-u67xx/clock_u67xx.h create mode 100644 arch/arm/plat-u6xxx/clock.c create mode 100644 arch/arm/plat-u6xxx/include/mach/clock.h
arch/arm/mach-u67xx/Makefile +1 -1
@@ -5,7 +5,7 @@ ## Object file lists. # Common support -obj-y := devices.o +obj-y := devices.o cgu.o # Specific board support obj-$(CONFIG_MACH_U67XX_WAVEC_2GB) += board_u67xx_wavex.o
arch/arm/mach-u67xx/cgu.c new file +760 -0
760 lines not on this page · raw message
arch/arm/mach-u67xx/clock_u67xx.h new file +876 -0
876 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 +650 -0
650 lines not on this page · raw message
arch/arm/plat-u6xxx/include/mach/clock.h new file +376 -0
376 lines not on this page · raw message
arch/arm/plat-u6xxx/timer.c +1 -0
@@ -19,6 +19,7 @@#include <asm/mach/irq.h> #include <linux/interrupt.h> #include <mach/irqs.h> +#include <mach/clock.h> #include <linux/clk.h>
Signature · 1 line
1.7.1
PATCH 2/6 U6715 clocks gating management U6 clock generic driver & U6715 cgu clock specific (V2)
arch/arm/mach-u67xx/cgu.c line 33
Quoted 6 lines · Philippe Langlais
arch/arm/mach-u67xx/cgu.c new file +6
-0+#if defined(DEBUG_CGU ) +#define debug(fmt, args...) \ + printk(PKMOD fmt, ## args) +#else +#define debug(fmt, args...) +#endif
pr_debug?
Quoted 13 lines
arch/arm/mach-u67xx/cgu.c new file +13
-0+ +/** +* U6 hw low level access clock functions +**/ +static void u6_clk_disable (struct clk *clk); +static int u6_clk_enable (struct clk *clk); + +/** +* HW enable clock function. +**/ + +static int u67xx_cgu_enable_fake_clock (struct clk *clk) +{
arch/arm/mach-u67xx/cgu.c line 56
Quoted 10 lines
arch/arm/mach-u67xx/cgu.c new file +10
-0+debug ("u67xx_cgu_enable_fake_clock for %s\n" , clk->name); +return 0 ; +} + +static int u67xx_cgu_enable_hw_clock (struct clk *clk) +{ +unsigned long value; +debug ("u67xx_cgu_enable_hw_clock for %s\n" , clk->name); + +if (unlikely (clk->enable_reg ==0 )) {
These are pointers. 0 is an integer. Use NULL. Check your code with sparse and you'll get warnings for these things.
arch/arm/mach-u67xx/clock_u67xx.h line 68
Quoted 9 lines
arch/arm/mach-u67xx/clock_u67xx.h new file +9
-0+/*** Basic clocks ***/ + +/* Base external input clocks */ +static struct clk func_32k_ck = { + .name ="func_32k_ck" , + .rate =32000 , + .flags =RATE_FIXED |ALWAYS_ENABLED , + .usecount =1 , +};
Don't put data definitions in header files.
Quoted 8 lines
arch/arm/mach-u67xx/clock_u67xx.h new file +8
-0+static struct clk *onchip_clks[] = { +/* external root sources */ + &func_32k_ck, + &osc_ck, + &sys_ck, + &sc_ck, + &fix_ck, + &tv_ck,
arch/arm/mach-u67xx/clock_u67xx.h line 805
Quoted 10 lines
arch/arm/mach-u67xx/clock_u67xx.h new file +10
-0+#ifndef U6_OPTIMIZED_TREE + &dsp2_ck, +#endif + &sdm_ck, + &arm_ck, + &hclk_ck, + &hclk2_ck, + &pclk1_ck, + &pclk2_ck, + &tvclk_ck,
This all looks very much like it was copied from the OMAP code as of about a year ago. The OMAP code has moved forwards with lots of improvements, including using clkdev to eliminate the disgusting SoC specific code from drivers (which clkdev is there to prevent.)
PATCH 2/6 U6715 clocks gating management U6 clock generic driver & U6715 cgu clock specific (V2)
Hi,
OK for all your remarks, we have changed our implementation to follow the new one using clkdev.
The new patch will be sent today.
Regards
Philippe
Quoted 76 lines · Russell King - ARM Linux
arch/arm/mach-u67xx/cgu.c line 33
Quoted 7 lines · Philippe Langlais
arch/arm/mach-u67xx/cgu.c new file +6
-0+#if defined(DEBUG_CGU ) +#define debug(fmt, args...) \ + printk(PKMOD fmt, ## args) +#else +#define debug(fmt, args...) +#endif
pr_debug?Quoted 14 lines
arch/arm/mach-u67xx/cgu.c new file +13
-0+ +/** +* U6 hw low level access clock functions +**/ +static void u6_clk_disable (struct clk *clk); +static int u6_clk_enable (struct clk *clk); + +/** +* HW enable clock function. +**/ + +static int u67xx_cgu_enable_fake_clock (struct clk *clk) +{arch/arm/mach-u67xx/cgu.c line 56
Quoted 10 lines
arch/arm/mach-u67xx/cgu.c new file +10
-0+debug ("u67xx_cgu_enable_fake_clock for %s\n" , clk->name); +return 0 ; +} + +static int u67xx_cgu_enable_hw_clock (struct clk *clk) +{ +unsigned long value; +debug ("u67xx_cgu_enable_hw_clock for %s\n" , clk->name); + +if (unlikely (clk->enable_reg ==0 )) {These are pointers. 0 is an integer. Use NULL. Check your code with sparse and you'll get warnings for these things.
arch/arm/mach-u67xx/clock_u67xx.h line 68
Quoted 10 lines
arch/arm/mach-u67xx/clock_u67xx.h new file +9
-0+/*** Basic clocks ***/ + +/* Base external input clocks */ +static struct clk func_32k_ck = { + .name ="func_32k_ck" , + .rate =32000 , + .flags =RATE_FIXED |ALWAYS_ENABLED , + .usecount =1 , +};Don't put data definitions in header files.
Quoted 9 lines
arch/arm/mach-u67xx/clock_u67xx.h new file +8
-0+static struct clk *onchip_clks[] = { +/* external root sources */ + &func_32k_ck, + &osc_ck, + &sys_ck, + &sc_ck, + &fix_ck, + &tv_ck,arch/arm/mach-u67xx/clock_u67xx.h line 805
Quoted 10 lines
arch/arm/mach-u67xx/clock_u67xx.h new file +10
-0+#ifndef U6_OPTIMIZED_TREE + &dsp2_ck, +#endif + &sdm_ck, + &arm_ck, + &hclk_ck, + &hclk2_ck, + &pclk1_ck, + &pclk2_ck, + &tvclk_ck,This all looks very much like it was copied from the OMAP code as of about a year ago. The OMAP code has moved forwards with lots of improvements, including using clkdev to eliminate the disgusting SoC specific code from drivers (which clkdev is there to prevent.)
PATCH 3/6 U6715 gpio platform driver This driver is U6 platform generic (V2)
In reply to Philippe Langlais--- arch/arm/mach-u67xx/board_u67xx_wavex.c | 469 ++++++++++++++++++++ arch/arm/mach-u67xx/devices.c | 12 +- arch/arm/plat-u6xxx/Makefile | 2 +- arch/arm/plat-u6xxx/gpio.c | 716 +++++++++++++++++++++++++++++++ arch/arm/plat-u6xxx/include/mach/gpio.h | 396 +++++++++++++++++ 5 files changed, 1588 insertions(+), 7 deletions(-) create mode 100644 arch/arm/plat-u6xxx/gpio.c create mode 100644 arch/arm/plat-u6xxx/include/mach/gpio.h
arch/arm/mach-u67xx/board_u67xx_wavex.c +469 -0
@@ -24,6 +24,474 @@#include <asm/mach/arch.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 ] = { + { + (void __iomem *)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 ))) + }, + { + (void __iomem *)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 */ + }, + { + (void __iomem *)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 */ + }, + { + (void __iomem *)SCON_SYSMUX3_REG , +0 + }, + { + (void __iomem *)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 */ + + }, + { + (void __iomem *)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 */ + }, + { + (void __iomem *)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 */ + }, + { + (void __iomem *)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 +{ + (void __iomem *)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 */ + }, + { + (void __iomem *)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 +{ + (void __iomem *)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 */ + }, + { + (void __iomem *)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 + { + (void __iomem *)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 + }, + { + (void __iomem *)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 */ + { + (void __iomem *)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 ))) + }, + { + (void __iomem *)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 ))) + }, + { + (void __iomem *)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 = {
@@ -31,6 +499,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 +6 -6
@@ -48,12 +48,12 @@ unsigned char extint_to_gpio[NR_EXTINT] = {EXPORT_SYMBOL (extint_to_gpio);struct gpio_bank u6_gpio_bank[6 ] = { - {(void __iomem *)GPIOA_PINS_REG , (void __iomem *)SCON_SYSMUX0_REG }, - {(void __iomem *)GPIOB_PINS_REG , (void __iomem *)SCON_SYSMUX2_REG }, - {(void __iomem *)GPIOC_PINS_REG , (void __iomem *)SCON_SYSMUX4_REG }, - {(void __iomem *)GPIOD_PINS_REG , (void __iomem *)SCON_SYSMUX6_REG }, - {(void __iomem *)GPIOE_PINS_REG , (void __iomem *)SCON_SYSMUX8_REG }, - {(void __iomem *)GPIOF_PINS_REG , (void __iomem *)SCON_SYSMUX10_REG }, + {GPIOA_PINS_REG ,SCON_SYSMUX0_REG }, + {GPIOB_PINS_REG ,SCON_SYSMUX2_REG }, + {GPIOC_PINS_REG ,SCON_SYSMUX4_REG }, + {GPIOD_PINS_REG ,SCON_SYSMUX6_REG }, + {GPIOE_PINS_REG ,SCON_SYSMUX8_REG }, + {GPIOF_PINS_REG ,SCON_SYSMUX10_REG }, };static struct gpio_data u6_gpio_data = {
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 +716 -0
716 lines not on this page · raw message
arch/arm/plat-u6xxx/include/mach/gpio.h new file +396 -0
396 lines not on this page · raw message
Signature · 1 line
1.7.1
PATCH 3/6 U6715 gpio platform driver This driver is U6 platform generic (V2)
Quoted 16 lines · Philippe Langlais
Signed-off-by Philippe Langlais <[email protected]>--- arch/arm/mach-u67xx/board_u67xx_wavex.c | 469 ++++++++++++++++++++ arch/arm/mach-u67xx/devices.c | 12 +- arch/arm/plat-u6xxx/Makefile | 2 +- arch/arm/plat-u6xxx/gpio.c | 716 +++++++++++++++++++++++++++++++ arch/arm/plat-u6xxx/include/mach/gpio.h | 396 +++++++++++++++++ 5 files changed, 1588 insertions(+), 7 deletions(-) create mode 100644 arch/arm/plat-u6xxx/gpio.c create mode 100644 arch/arm/plat-u6xxx/include/mach/gpio.harch/arm/mach-u67xx/board_u67xx_wavex.c +0
-0
arch/arm/mach-u67xx/board_u67xx_wavex.c line 27
Quoted 4 lines
arch/arm/mach-u67xx/board_u67xx_wavex.c +1
-0@@ -24,6 +24,474 @@#include <asm/mach/arch.h> #include <mach/irqs.h> #include <mach/timer.h> +#include <mach/gpio.h>
linux/gpio.h
arch/arm/mach-u67xx/board_u67xx_wavex.c line 37
Quoted 10 lines
arch/arm/mach-u67xx/board_u67xx_wavex.c +10
-0+ +#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 ] = { + { + (void __iomem *)SCON_SYSMUX0_REG ,
IOMEM() to eliminate the cast?
arch/arm/mach-u67xx/board_u67xx_wavex.c line 389
Quoted 6 lines
arch/arm/mach-u67xx/board_u67xx_wavex.c +6
-0+/* 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 ,
Unnecessary spaces between 'OUTPUT' and ','
Quoted 174 lines
arch/arm/mach-u67xx/board_u67xx_wavex.c +106
-0+ .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 = {@@ -31,6 +499,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 +6
-6@@ -48,12 +48,12 @@ unsigned char extint_to_gpio[NR_EXTINT] = {EXPORT_SYMBOL (extint_to_gpio);struct gpio_bank u6_gpio_bank[6 ] = { - {(void __iomem *)GPIOA_PINS_REG , (void __iomem *)SCON_SYSMUX0_REG }, - {(void __iomem *)GPIOB_PINS_REG , (void __iomem *)SCON_SYSMUX2_REG }, - {(void __iomem *)GPIOC_PINS_REG , (void __iomem *)SCON_SYSMUX4_REG }, - {(void __iomem *)GPIOD_PINS_REG , (void __iomem *)SCON_SYSMUX6_REG }, - {(void __iomem *)GPIOE_PINS_REG , (void __iomem *)SCON_SYSMUX8_REG }, - {(void __iomem *)GPIOF_PINS_REG , (void __iomem *)SCON_SYSMUX10_REG }, + {GPIOA_PINS_REG ,SCON_SYSMUX0_REG }, + {GPIOB_PINS_REG ,SCON_SYSMUX2_REG }, + {GPIOC_PINS_REG ,SCON_SYSMUX4_REG }, + {GPIOD_PINS_REG ,SCON_SYSMUX6_REG }, + {GPIOE_PINS_REG ,SCON_SYSMUX8_REG }, + {GPIOF_PINS_REG ,SCON_SYSMUX10_REG }, };static struct gpio_data u6_gpio_data = {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.oarch/arm/plat-u6xxx/gpio.c new file +17
-0@@ -0,0 +1,716 @@ +/* +* 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 <mach/hardware.h> +#include <asm/irq.h> +#include <mach/irqs.h> +#include <mach/gpio.h> +#include <asm/mach/irq.h> +#include <mach/scon.h>
asm/ before mach/.
Quoted 23 lines
arch/arm/plat-u6xxx/gpio.c new file +23
-0+ +/* +* PN5220 GPIO/MUX registers +* defined in asm/arch/registers.h +*/ + +#define U6_GPIO_PINS_OFFSET 0 +#define U6_GPIO_OUTPUT_OFFSET 4 +#define U6_GPIO_DIR_OFFSET 8 + +#define U6_MUX2_OFFSET 4 + +static struct gpio_bank *gpio_bank_desc; +static int gpio_bank_count; + +static inline struct gpio_bank *get_gpio_bank (int gpio) +{ +/* 32 GPIOs per bank */ +return &(gpio_bank_desc[gpio >>5 ]); +} + +static inline int get_gpio_index (int gpio) +{
arch/arm/plat-u6xxx/gpio.c line 60
Quoted 10 lines
arch/arm/plat-u6xxx/gpio.c new file +10
-0+return gpio &0x1f ; +} + +static int check_gpio (int gpio) +{ +int retval = ((unsigned int )gpio) <GPIO_COUNT ; +if (unlikely (!retval)) { +printk (KERN_ERR "u6-gpio: invalid GPIO %d\n" , gpio); +dump_stack (); + }
return WARN_ON((unsigned int)gpio < GPIO_COUNT);
or use WARN(condition, format) if you want a custom message.
arch/arm/plat-u6xxx/gpio.c line 112
Quoted 10 lines
arch/arm/plat-u6xxx/gpio.c new file +10
-0+static void _set_gpio_direction (struct gpio_bank *bank,int gpio,int is_input) +{ +u32 reg = bank->gpio_base; +u32 l; + +/* select direction register */ + reg +=U6_GPIO_DIR_OFFSET ; + +/* in register 0 = input, 1 = output */ + l =inl (reg);
inl/outl are for PCI/ISA based IO accesses/emulation. I don't think your GPIO block is a PCI/ISA peripheral, so it should not be using these macros.
arch/arm/plat-u6xxx/gpio.c line 612
Quoted 11 lines
arch/arm/plat-u6xxx/gpio.c new file +11
-0+static int initialized; + +static int __init u6_gpio_probe (struct platform_device *pdev) +{ +int i, j; +int gpio =0 ; +struct gpio_bank *bank; +struct gpio_data *data = pdev->dev.platform_data; +unsigned long flags; + + initialized =1 ;
Why is this here when you're really wanting to prevent the platform driver structure being registered more than once?
Quoted 73 lines
arch/arm/plat-u6xxx/gpio.c new file +73
-0+ +printk (KERN_INFO "U6 GPIO\n" ); + gpio_bank_desc = data->gpio_bank_desc; + gpio_bank_count = data->nb_banks; + +for (i =0 ; i < gpio_bank_count; i++) { +int gpio_count =32 ;/* 32 GPIO per bank */ + bank = &gpio_bank_desc[i]; + bank->reserved_map =0 ; +spin_lock_init (&bank->lock); + + bank->chip.request = u6_gpio_acquire; + bank->chip.free = u6_gpio_release; + bank->chip.direction_input = gpio_input; + bank->chip.get = gpio_get; + bank->chip.direction_output = gpio_output; + bank->chip.set = gpio_set; + bank->chip.to_irq = gpio_2irq; + bank->chip.label ="gpio" ; + bank->chip.base = gpio; + gpio += gpio_count; + + bank->chip.ngpio = gpio_count; + +gpiochip_add (&bank->chip); + + } + +/* for extint */ +for (j =IRQ_COUNT ; j <IRQ_COUNT +NR_EXTINT ; j++) { +set_irq_chip (j, &gpio_irq_chip); +set_irq_handler (j, handle_simple_irq); +set_irq_flags (j,IRQF_VALID ); + } + +hw_raw_local_irq_save (flags); +/* mask all EXT IRQ sources before registring handler */ +/* read status */ + j =inl (EXTINT_STATUS_REG ) &inl (EXTINT_ENABLE3_REG ); +/* clear IRQ source(s) */ +outl (j,EXTINT_STATUS_REG ); + +outl (0 ,EXTINT_ENABLE3_REG ); + +/* set irq in low level */ +set_irq_type (IRQ_EXTINT3 ,IRQF_TRIGGER_LOW ); + +/* chained GPIO-IRQ on EXTINT3 */ +set_irq_chained_handler (IRQ_EXTINT3 , gpio_irq_handler); +hw_raw_local_irq_restore (flags); + +return 0 ; +} + +static struct platform_driver u6_gpio_driver = { + .probe = u6_gpio_probe, + .remove =NULL , + .suspend =NULL , + .resume =NULL , + .driver = { + .name ="u6-gpio" , + }, +}; + +static struct sysdev_class u6_gpio_sysclass = { + .name ="gpio" , + .suspend =0 ,/*u6_gpio_suspend, */ + .resume =0 ,/*u6_gpio_resume, */ +}; + +static struct sys_device u6_gpio_device = { + .id =0 , + .cls = &u6_gpio_sysclass,
arch/arm/plat-u6xxx/gpio.c line 695
Quoted 10 lines
arch/arm/plat-u6xxx/gpio.c new file +10
-0+}; + +/* +* This may get called early from board specific init +* for boards that have interrupts routed via FPGA. +*/ +int u6_gpio_init (void ) +{ +if (!initialized) +return platform_driver_register (&u6_gpio_driver);
Shouldn't this set 'initialized' once the platform driver has been registered to prevent the platform driver being registered again?
arch/arm/plat-u6xxx/gpio.c line 705
Quoted 10 lines
arch/arm/plat-u6xxx/gpio.c new file +10
-0+else +return 0 ; +} + +static int __init u6_gpio_sysinit (void ) +{ +int ret =0 ; + +if (!initialized) + ret =u6_gpio_init ();
Why not just call u6_gpio_init(), which handles the special case anyway?
Quoted 23 lines
arch/arm/plat-u6xxx/gpio.c new file +11
-0+ +if (ret ==0 ) { + ret =sysdev_class_register (&u6_gpio_sysclass); +if (ret ==0 ) + ret =sysdev_register (&u6_gpio_device); + } + +return ret; +} + +arch_initcall (u6_gpio_sysinit);arch/arm/plat-u6xxx/include/mach/gpio.h new file +6
-0@@ -0,0 +1,396 @@ +/* +* linux/arch/arm/plat-u6xxx/include/mach/gpio.h +* +* Copyright (C) ST-Ericsson SA 2010 +* Author: Loic Pallardy <[email protected]> for ST-Ericsson. +* License terms: GNU General Public License (GPL), version 2
arch/arm/plat-u6xxx/include/mach/gpio.h line 16
Quoted 10 lines
arch/arm/plat-u6xxx/include/mach/gpio.h new file +10
-0+* GPIO handling defines and functions +*/ + +#ifndef __ASM_PLAT_U6_GPIO_H +#define __ASM_PLAT_U6_GPIO_H + +#include <linux/io.h> +#include <mach/hardware.h> +#include <mach/irqs.h> +#include <mach/gpio.h>
Recursive include of mach/gpio.h
arch/arm/plat-u6xxx/include/mach/gpio.h line 19
Quoted 3 lines
arch/arm/plat-u6xxx/include/mach/gpio.h new file +3
-0+ +#include <linux/errno.h> +#include <asm-generic/gpio.h>
linux/ includes before asm and mach includes.
PATCH 3/6 U6715 gpio platform driver This driver is U6 platform generic (V2)
Hi,
I' have fix in the following patch all your comments.
Regards,
Philippe
Quoted 453 lines · Russell King - ARM Linux
Quoted 16 lines · Philippe Langlais
Signed-off-by Philippe Langlais<[email protected]>--- arch/arm/mach-u67xx/board_u67xx_wavex.c | 469 ++++++++++++++++++++ arch/arm/mach-u67xx/devices.c | 12 +- arch/arm/plat-u6xxx/Makefile | 2 +- arch/arm/plat-u6xxx/gpio.c | 716 +++++++++++++++++++++++++++++++ arch/arm/plat-u6xxx/include/mach/gpio.h | 396 +++++++++++++++++ 5 files changed, 1588 insertions(+), 7 deletions(-)create mode 100644
arch/arm/plat-u6xxx/gpio.ccreate mode 100644arch/arm/plat-u6xxx/include/mach/gpio.harch/arm/mach-u67xx/board_u67xx_wavex.c +0
-0arch/arm/mach-u67xx/board_u67xx_wavex.c line 28
Quoted 5 lines
arch/arm/mach-u67xx/board_u67xx_wavex.c +1
-0@@ -24,6 +24,474 @@#include <asm/mach/arch.h> #include <mach/irqs.h> #include <mach/timer.h> +#include <mach/gpio.h>
linux/gpio.harch/arm/mach-u67xx/board_u67xx_wavex.c
Quoted 11 lines
arch/arm/mach-u67xx/board_u67xx_wavex.c +10
-0+ +#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 ] = { + { + (void __iomem *)SCON_SYSMUX0_REG ,
IOMEM()to eliminate the cast?arch/arm/mach-u67xx/board_u67xx_wavex.c
Quoted 7 lines
arch/arm/mach-u67xx/board_u67xx_wavex.c +6
-0+/* 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 ,Unnecessary spaces between 'OUTPUT' and ','
Quoted 175 lines
arch/arm/mach-u67xx/board_u67xx_wavex.c +106
-0+ .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 = {@@ -31,6 +499,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 +6
-6@@ -48,12 +48,12 @@ unsigned char extint_to_gpio[NR_EXTINT] = {EXPORT_SYMBOL (extint_to_gpio);struct gpio_bank u6_gpio_bank[6 ] = { - {(void __iomem *)GPIOA_PINS_REG , (void __iomem *)SCON_SYSMUX0_REG }, - {(void __iomem *)GPIOB_PINS_REG , (void __iomem *)SCON_SYSMUX2_REG }, - {(void __iomem *)GPIOC_PINS_REG , (void __iomem *)SCON_SYSMUX4_REG }, - {(void __iomem *)GPIOD_PINS_REG , (void __iomem *)SCON_SYSMUX6_REG }, - {(void __iomem *)GPIOE_PINS_REG , (void __iomem *)SCON_SYSMUX8_REG }, - {(void __iomem *)GPIOF_PINS_REG , (void __iomem *)SCON_SYSMUX10_REG }, + {GPIOA_PINS_REG ,SCON_SYSMUX0_REG }, + {GPIOB_PINS_REG ,SCON_SYSMUX2_REG }, + {GPIOC_PINS_REG ,SCON_SYSMUX4_REG }, + {GPIOD_PINS_REG ,SCON_SYSMUX6_REG }, + {GPIOE_PINS_REG ,SCON_SYSMUX8_REG }, + {GPIOF_PINS_REG ,SCON_SYSMUX10_REG }, };static struct gpio_data u6_gpio_data = {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.oarch/arm/plat-u6xxx/gpio.c new file +17
-0@@ -0,0 +1,716 @@ +/* +* 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 <mach/hardware.h> +#include <asm/irq.h> +#include <mach/irqs.h> +#include <mach/gpio.h> +#include <asm/mach/irq.h> +#include <mach/scon.h> asm/ before mach/.
Quoted 24 lines
arch/arm/plat-u6xxx/gpio.c new file +23
-0+ +/* +* PN5220 GPIO/MUX registers +* defined in asm/arch/registers.h +*/ + +#define U6_GPIO_PINS_OFFSET 0 +#define U6_GPIO_OUTPUT_OFFSET 4 +#define U6_GPIO_DIR_OFFSET 8 + +#define U6_MUX2_OFFSET 4 + +static struct gpio_bank *gpio_bank_desc; +static int gpio_bank_count; + +static inline struct gpio_bank *get_gpio_bank (int gpio) +{ +/* 32 GPIOs per bank */ +return &(gpio_bank_desc[gpio>>5 ]); +} + +static inline int get_gpio_index (int gpio) +{arch/arm/plat-u6xxx/gpio.c line 60
Quoted 10 lines
arch/arm/plat-u6xxx/gpio.c new file +10
-0+return gpio&0x1f ; +} + +static int check_gpio (int gpio) +{ +int retval = ((unsigned int )gpio)<GPIO_COUNT ; +if (unlikely (!retval)) { +printk (KERN_ERR "u6-gpio: invalid GPIO %d\n" , gpio); +dump_stack (); + }return WARN_ON((unsigned int)gpio< GPIO_COUNT);or use
WARN(condition, format)if you want a custom message.arch/arm/plat-u6xxx/gpio.c line 112
Quoted 11 lines
arch/arm/plat-u6xxx/gpio.c new file +10
-0+static void _set_gpio_direction (struct gpio_bank *bank,int gpio,int is_input) +{ +u32 reg = bank->gpio_base; +u32 l; + +/* select direction register */ + reg +=U6_GPIO_DIR_OFFSET ; + +/* in register 0 = input, 1 = output */ + l =inl (reg);inl/outl are for PCI/ISA based IO accesses/emulation. I don't think your GPIO block is a PCI/ISA peripheral, so it should not be using these macros.
arch/arm/plat-u6xxx/gpio.c line 612
Quoted 12 lines
arch/arm/plat-u6xxx/gpio.c new file +11
-0+static int initialized; + +static int __init u6_gpio_probe (struct platform_device *pdev) +{ +int i, j; +int gpio =0 ; +struct gpio_bank *bank; +struct gpio_data *data = pdev->dev.platform_data; +unsigned long flags; + + initialized =1 ;Why is this here when you're really wanting to prevent the platform driver structure being registered more than once?
Quoted 74 lines
arch/arm/plat-u6xxx/gpio.c new file +73
-0+ +printk (KERN_INFO "U6 GPIO\n" ); + gpio_bank_desc = data->gpio_bank_desc; + gpio_bank_count = data->nb_banks; + +for (i =0 ; i< gpio_bank_count; i++) { +int gpio_count =32 ;/* 32 GPIO per bank */ + bank =&gpio_bank_desc[i]; + bank->reserved_map =0 ; +spin_lock_init (&bank->lock); + + bank->chip.request = u6_gpio_acquire; + bank->chip.free = u6_gpio_release; + bank->chip.direction_input = gpio_input; + bank->chip.get = gpio_get; + bank->chip.direction_output = gpio_output; + bank->chip.set = gpio_set; + bank->chip.to_irq = gpio_2irq; + bank->chip.label ="gpio" ; + bank->chip.base = gpio; + gpio += gpio_count; + + bank->chip.ngpio = gpio_count; + +gpiochip_add (&bank->chip); + + } + +/* for extint */ +for (j =IRQ_COUNT ; j<IRQ_COUNT +NR_EXTINT ; j++) { +set_irq_chip (j,&gpio_irq_chip); +set_irq_handler (j, handle_simple_irq); +set_irq_flags (j,IRQF_VALID ); + } + +hw_raw_local_irq_save (flags); +/* mask all EXT IRQ sources before registring handler */ +/* read status */ + j =inl (EXTINT_STATUS_REG )&inl (EXTINT_ENABLE3_REG ); +/* clear IRQ source(s) */ +outl (j,EXTINT_STATUS_REG ); + +outl (0 ,EXTINT_ENABLE3_REG ); + +/* set irq in low level */ +set_irq_type (IRQ_EXTINT3 ,IRQF_TRIGGER_LOW ); + +/* chained GPIO-IRQ on EXTINT3 */ +set_irq_chained_handler (IRQ_EXTINT3 , gpio_irq_handler); +hw_raw_local_irq_restore (flags); + +return 0 ; +} + +static struct platform_driver u6_gpio_driver = { + .probe = u6_gpio_probe, + .remove =NULL , + .suspend =NULL , + .resume =NULL , + .driver = { + .name ="u6-gpio" , + }, +}; + +static struct sysdev_class u6_gpio_sysclass = { + .name ="gpio" , + .suspend =0 ,/*u6_gpio_suspend, */ + .resume =0 ,/*u6_gpio_resume, */ +}; + +static struct sys_device u6_gpio_device = { + .id =0 , + .cls =&u6_gpio_sysclass,arch/arm/plat-u6xxx/gpio.c line 695
Quoted 10 lines
arch/arm/plat-u6xxx/gpio.c new file +10
-0+}; + +/* +* This may get called early from board specific init +* for boards that have interrupts routed via FPGA. +*/ +int u6_gpio_init (void ) +{ +if (!initialized) +return platform_driver_register (&u6_gpio_driver);Shouldn't this set 'initialized' once the platform driver has been registered to prevent the platform driver being registered again?
arch/arm/plat-u6xxx/gpio.c line 705
Quoted 11 lines
arch/arm/plat-u6xxx/gpio.c new file +10
-0+else +return 0 ; +} + +static int __init u6_gpio_sysinit (void ) +{ +int ret =0 ; + +if (!initialized) + ret =u6_gpio_init ();Why not just call
u6_gpio_init(), which handles the special case anyway?Quoted 24 lines
arch/arm/plat-u6xxx/gpio.c new file +11
-0+ +if (ret ==0 ) { + ret =sysdev_class_register (&u6_gpio_sysclass); +if (ret ==0 ) + ret =sysdev_register (&u6_gpio_device); + } + +return ret; +} + +arch_initcall (u6_gpio_sysinit);arch/arm/plat-u6xxx/include/mach/gpio.h new file +6
-0@@ -0,0 +1,396 @@ +/* +* linux/arch/arm/plat-u6xxx/include/mach/gpio.h +* +* Copyright (C) ST-Ericsson SA 2010 +* Author: Loic Pallardy<[email protected]> for ST-Ericsson. +* License terms: GNU General Public License (GPL), version 2 arch/arm/plat-u6xxx/include/mach/gpio.h line 16
Quoted 10 lines
arch/arm/plat-u6xxx/include/mach/gpio.h new file +10
-0+* GPIO handling defines and functions +*/ + +#ifndef __ASM_PLAT_U6_GPIO_H +#define __ASM_PLAT_U6_GPIO_H + +#include <linux/io.h> +#include <mach/hardware.h> +#include <mach/irqs.h> +#include <mach/gpio.h> Recursive include of
mach/gpio.harch/arm/plat-u6xxx/include/mach/gpio.h line 19
Quoted 4 lines
arch/arm/plat-u6xxx/include/mach/gpio.h new file +3
-0+ +#include <linux/errno.h> +#include <asm-generic/gpio.h> linux/ includes before asm and mach includes.
PATCH 4/6 U6715 platform serial driver It's a generic driver for all U6 platform (V2)
In reply to Philippe Langlais--- arch/arm/plat-u6xxx/Makefile | 2 +- arch/arm/plat-u6xxx/include/mach/serial.h | 23 ++++++ arch/arm/plat-u6xxx/serial.c | 115 +++++++++++++++++++++++++++++ 3 files changed, 139 insertions(+), 1 deletions(-) create mode 100644 arch/arm/plat-u6xxx/include/mach/serial.h create mode 100644 arch/arm/plat-u6xxx/serial.c
arch/arm/plat-u6xxx/Makefile +1 -1
@@ -3,6 +3,6 @@ # # Common support -obj-y := io.o irq.o clock.o gpio.o +obj-y := io.o irq.o clock.o gpio.o serial.o obj-$(CONFIG_U6_MTU_TIMER) += timer.o
arch/arm/plat-u6xxx/include/mach/serial.h new file +23 -0
@@ -0,0 +1,23 @@ +/* +* linux/arch/arm/plat-u6xxx/include/mach/serial.h +* +* Copyright (C) ST-Ericsson SA 2010 +* Author: Ludovic Barre <[email protected]> for ST-Ericsson. +* License terms: GNU General Public License (GPL), version 2 +*/ + + +#ifndef __SERIAL_H +#define __SERIAL_H + +#include <linux/clk.h> + +struct u6_uart { +struct clk *uartClk; +struct clk *pClk_13M; +struct clk *pClk_26M; +struct clk *pClk_pclk; +char uart_name[7 ]; +}; + +#endif /* __SERIAL_H */
arch/arm/plat-u6xxx/serial.c new file +115 -0
115 lines not on this page · raw message
Signature · 1 line
1.7.1
PATCH 4/6 U6715 platform serial driver It's a generic driver for all U6 platform (V2)
arch/arm/plat-u6xxx/include/mach/serial.h line 21
Quoted 7 lines · Philippe Langlais
arch/arm/plat-u6xxx/include/mach/serial.h new file +7
-0+struct u6_uart { +struct clk *uartClk; +struct clk *pClk_13M; +struct clk *pClk_26M; +struct clk *pClk_pclk; +char uart_name[7 ]; +};
Passing struct clk's through platform data into drivers... what's the point of the clk API again?
PATCH 5/6 U6715 8250 serial like driver
In reply to Philippe LanglaisSome modifications in 16550A/8250 serial driver
and clock management specificity
--- drivers/serial/8250.c | 26 ++++++- drivers/serial/8250_u6.c | 177 +++++++++++++++++++++++++++++++++++++++++++ drivers/serial/Kconfig | 19 +++++ drivers/serial/Makefile | 1 + include/linux/serial_8250.h | 8 ++ 5 files changed, 230 insertions(+), 1 deletions(-) create mode 100644 drivers/serial/8250_u6.c
drivers/serial/8250.c +25 -1
@@ -199,10 +199,16 @@ static const struct serial8250_config uart_config[] = { }, [PORT_16550A] = { .name = "16550A", +#if defined(CONFIG_SERIAL_8250_U6) + .fifo_size = 64, + .tx_loadsz = 64, + .flags = UART_CAP_FIFO | UART_CAP_AFE, +#else .fifo_size = 16, .tx_loadsz = 16, - .fcr = UART_FCR_ENABLE_FIFO | UART_FCR_R_TRIG_10, .flags = UART_CAP_FIFO, +#endif + .fcr = UART_FCR_ENABLE_FIFO | UART_FCR_R_TRIG_10, }, [PORT_CIRRUS] = { .name = "Cirrus",
@@ -2268,6 +2274,13 @@ serial8250_set_termios(struct uart_port *port, struct ktermios *termios,/* * Ask the core to calculate the divisor for us. */ +#ifdef CONFIG_SERIAL_8250_CUSTOM_CLOCK + baud =uart_get_baud_rate (port, termios, old,0 , +CONFIG_SERIAL_8250_CUSTOM_MAX_BAUDRATE ); +/* Calculate the new uart clock frequency if it is tunable */ + port->uartclk =serial8250_get_custom_clock (port, baud); +#endif + baud =uart_get_baud_rate (port, termios, old, port->uartclk /16 /0xffff , port->uartclk /16 );
@@ -2298,6 +2311,13 @@ serial8250_set_termios(struct uart_port *port, struct ktermios *termios, up->mcr &= ~UART_MCR_AFE ;if (termios->c_cflag &CRTSCTS ) up->mcr |=UART_MCR_AFE ; +#if defined(CONFIG_SERIAL_8250_U6 ) +/** +* When AFE is active, let the HW handle the stop/restart TX +* upon CTS change. It reacts much quicker than the SW driver. +*/ + port->flags &= ~ASYNC_CTS_FLOW ; +#endif }/*
@@ -2383,6 +2403,10 @@ serial8250_set_termios(struct uart_port *port, struct ktermios *termios,serial_outp (up,UART_LCR , cval |UART_LCR_DLAB );/* set DLAB */ } +#ifdef CONFIG_SERIAL_8250_CUSTOM_CLOCK +/* set the new uart clock frequency if it is tunable */ +serial8250_set_custom_clock (port); +#endif serial_dl_write (up, quot);/*
drivers/serial/8250_u6.c new file +177 -0
177 lines not on this page · raw message
drivers/serial/Kconfig +19 -0
@@ -163,6 +163,25 @@ config SERIAL_8250_MANY_PORTS say N here to save some memory. You can also say Y if you have an "intelligent" multiport card such as Cyclades, Digiboards, etc. +config SERIAL_8250_U6XXX + bool + depends on SERIAL_8250_EXTENDED && PLAT_U6XXX + default y + +config SERIAL_8250_CUSTOM_CLOCK + bool "Support serial ports with tunable input clock frequency" + depends on SERIAL_8250_EXTENDED && SERIAL_8250_U6XXX + default y + help + Say Y here if your platform has specific registers to change UART clock frequency. + +config SERIAL_8250_CUSTOM_MAX_BAUDRATE + int "Maximal reachable baudrate" + depends on SERIAL_8250_CUSTOM_CLOCK + default "3250000" + help + The value of the maximal reachable baudrate when tuning UART clock frequency (default value: 3.25MBds). + # # Multi-port serial cards #
drivers/serial/Makefile +1 -0
@@ -28,6 +28,7 @@ obj-$(CONFIG_SERIAL_8250_BOCA) += 8250_boca.o obj-$(CONFIG_SERIAL_8250_EXAR_ST16C554) += 8250_exar_st16c554.o obj-$(CONFIG_SERIAL_8250_HUB6) += 8250_hub6.o obj-$(CONFIG_SERIAL_8250_MCA) += 8250_mca.o +obj-$(CONFIG_SERIAL_8250_U6XXX) += 8250_u6.o obj-$(CONFIG_SERIAL_AMBA_PL010) += amba-pl010.o obj-$(CONFIG_SERIAL_AMBA_PL011) += amba-pl011.o obj-$(CONFIG_SERIAL_CLPS711X) += clps711x.o
include/linux/serial_8250.h +8 -0
@@ -72,4 +72,12 @@ extern int serial8250_find_port(struct uart_port *p);extern int serial8250_find_port_for_earlycon (void );extern int setup_early_serial8250_console (char *cmdline); +#ifdef CONFIG_SERIAL_8250_CUSTOM_CLOCK +unsigned int serial8250_enable_clock (struct uart_port *port); +unsigned int serial8250_disable_clock (struct uart_port *port); +unsigned int serial8250_get_custom_clock (struct uart_port *port, +unsigned int baud); +void serial8250_set_custom_clock (struct uart_port *port); +#endif +#endif
Signature · 1 line
1.7.1
PATCH 5/6 U6715 8250 serial like driver
Quoted 2 lines · Philippe Langlais
Some modifications in 16550A/8250 serial driver
and clock management specificity
Can't say much about this; you need to get people interested in serial to review this. The comments about header file ordering apply.
drivers/serial/8250.c static const struct serial8250_config uart_config[] = { · line 205
Quoted 8 lines
drivers/serial/8250.c +4
-0@@ -199,10 +199,16 @@ static const struct serial8250_config uart_config[] = { }, [PORT_16550A ] = { .name ="16550A" , +#if defined(CONFIG_SERIAL_8250_U6) + .fifo_size =64 , + .tx_loadsz =64 , + .flags = UART_CAP_FIFO | UART_CAP_AFE,
If you have auto flow control, then you don't have a 16550A. You have something that is compatible with a 16550A - maybe it's more closely related to a 16750?
PATCH 5/6 U6715 8250 serial like driver
Hi
Quoted 9 lines · Russell King - ARM Linux
Quoted 3 lines · Philippe Langlais
Some modifications in 16550A/8250 serial driver
and clock management specificityCan't say much about this; you need to get people interested in serial to review this. The comments about header file ordering apply.
Quoted 13 lines
drivers/serial/8250.c static const struct serial8250_config uart_config[] = { · line 206
Quoted 9 lines
drivers/serial/8250.c +4
-0@@ -199,10 +199,16 @@ static const struct serial8250_config uart_config[] = { }, [PORT_16550A ] = { .name ="16550A" , +#if defined(CONFIG_SERIAL_8250_U6) + .fifo_size =64 , + .tx_loadsz =64 , + .flags = UART_CAP_FIFO | UART_CAP_AFE,If you have auto flow control, then you don't have a 16550A. You have something that is compatible with a 16550A - maybe it's more closely related to a 16750?
I'll send our serial driver to the LKML and discuss about that.
Regards
Philippe
PATCH 6/6 U6715 Default configuration for ST-Ericsson reference design boards
In reply to Philippe LanglaisIt's a minimal configuration
--- arch/arm/configs/u67xx_wavex_defconfig | 1096 ++++++++++++++++++++++++++++++++ 1 files changed, 1096 insertions(+), 0 deletions(-) create mode 100644 arch/arm/configs/u67xx_wavex_defconfig
arch/arm/configs/u67xx_wavex_defconfig new file +1096 -0
@@ -0,0 +1,1096 @@ +# +# Automatically generated make config: don't edit +# Linux kernel version: 2.6.34 +# Thu May 27 09:37:28 2010 +# +CONFIG_ARM=y +CONFIG_SYS_SUPPORTS_APM_EMULATION=y +CONFIG_GENERIC_GPIO=y +CONFIG_GENERIC_TIME=y +# CONFIG_ARCH_USES_GETTIMEOFFSET is not set +CONFIG_GENERIC_CLOCKEVENTS=y +CONFIG_HAVE_PROC_CPU=y +CONFIG_GENERIC_HARDIRQS=y +CONFIG_STACKTRACE_SUPPORT=y +CONFIG_HAVE_LATENCYTOP_SUPPORT=y +CONFIG_LOCKDEP_SUPPORT=y +CONFIG_TRACE_IRQFLAGS_SUPPORT=y +CONFIG_HARDIRQS_SW_RESEND=y +CONFIG_GENERIC_IRQ_PROBE=y +CONFIG_RWSEM_GENERIC_SPINLOCK=y +CONFIG_GENERIC_HWEIGHT=y +CONFIG_GENERIC_CALIBRATE_DELAY=y +CONFIG_NEED_DMA_MAP_STATE=y +CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y +CONFIG_VECTORS_BASE=0xffff0000 +CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" +CONFIG_CONSTRUCTORS=y + +# +# General setup +# +CONFIG_EXPERIMENTAL=y +CONFIG_BROKEN_ON_SMP=y +CONFIG_LOCK_KERNEL=y +CONFIG_INIT_ENV_ARG_LIMIT=32 +CONFIG_CROSS_COMPILE="" +CONFIG_LOCALVERSION="" +# CONFIG_LOCALVERSION_AUTO is not set +CONFIG_HAVE_KERNEL_GZIP=y +CONFIG_HAVE_KERNEL_LZMA=y +CONFIG_HAVE_KERNEL_LZO=y +CONFIG_KERNEL_GZIP=y +# CONFIG_KERNEL_BZIP2 is not set +# CONFIG_KERNEL_LZMA is not set +# CONFIG_KERNEL_LZO is not set +CONFIG_SWAP=y +CONFIG_SYSVIPC=y +CONFIG_SYSVIPC_SYSCTL=y +# CONFIG_POSIX_MQUEUE is not set +# CONFIG_BSD_PROCESS_ACCT is not set +# CONFIG_TASKSTATS is not set +# CONFIG_AUDIT is not set + +# +# RCU Subsystem +# +CONFIG_TREE_RCU=y +# CONFIG_TREE_PREEMPT_RCU is not set +# CONFIG_TINY_RCU is not set +# CONFIG_RCU_TRACE is not set +CONFIG_RCU_FANOUT=32 +# CONFIG_RCU_FANOUT_EXACT is not set +# CONFIG_TREE_RCU_TRACE is not set +# CONFIG_IKCONFIG is not set +CONFIG_LOG_BUF_SHIFT=14 +# CONFIG_CGROUPS is not set +# CONFIG_SYSFS_DEPRECATED_V2 is not set +# CONFIG_RELAY is not set +# CONFIG_NAMESPACES is not set +CONFIG_BLK_DEV_INITRD=y +CONFIG_INITRAMFS_SOURCE="" +CONFIG_RD_GZIP=y +# CONFIG_RD_BZIP2 is not set +# CONFIG_RD_LZMA is not set +# CONFIG_RD_LZO is not set +CONFIG_CC_OPTIMIZE_FOR_SIZE=y +CONFIG_SYSCTL=y +CONFIG_ANON_INODES=y +CONFIG_EMBEDDED=y +CONFIG_UID16=y +CONFIG_SYSCTL_SYSCALL=y +CONFIG_KALLSYMS=y +CONFIG_KALLSYMS_ALL=y +# CONFIG_KALLSYMS_EXTRA_PASS is not set +CONFIG_HOTPLUG=y +CONFIG_PRINTK=y +CONFIG_BUG=y +CONFIG_ELF_CORE=y +CONFIG_BASE_FULL=y +CONFIG_FUTEX=y +CONFIG_EPOLL=y +CONFIG_SIGNALFD=y +CONFIG_TIMERFD=y +CONFIG_EVENTFD=y +CONFIG_SHMEM=y +CONFIG_AIO=y +CONFIG_HAVE_PERF_EVENTS=y +CONFIG_PERF_USE_VMALLOC=y + +# +# Kernel Performance Events And Counters +# +CONFIG_PERF_EVENTS=y +# CONFIG_PERF_COUNTERS is not set +# CONFIG_DEBUG_PERF_USE_VMALLOC is not set +CONFIG_VM_EVENT_COUNTERS=y +# CONFIG_SLUB_DEBUG is not set +CONFIG_COMPAT_BRK=y +# CONFIG_SLAB is not set +CONFIG_SLUB=y +# CONFIG_SLOB is not set +CONFIG_PROFILING=y +CONFIG_OPROFILE=y +CONFIG_HAVE_OPROFILE=y +# CONFIG_KPROBES is not set +CONFIG_HAVE_KPROBES=y +CONFIG_HAVE_KRETPROBES=y + +# +# GCOV-based kernel profiling +# +# CONFIG_GCOV_KERNEL is not set +# CONFIG_SLOW_WORK is not set +CONFIG_HAVE_GENERIC_DMA_COHERENT=y +CONFIG_RT_MUTEXES=y +CONFIG_BASE_SMALL=0 +CONFIG_MODULES=y +# CONFIG_MODULE_FORCE_LOAD is not set +CONFIG_MODULE_UNLOAD=y +# CONFIG_MODULE_FORCE_UNLOAD is not set +# CONFIG_MODVERSIONS is not set +# CONFIG_MODULE_SRCVERSION_ALL is not set +CONFIG_BLOCK=y +CONFIG_LBDAF=y +# CONFIG_BLK_DEV_BSG is not set +# CONFIG_BLK_DEV_INTEGRITY is not set + +# +# IO Schedulers +# +CONFIG_IOSCHED_NOOP=y +CONFIG_IOSCHED_DEADLINE=y +# CONFIG_IOSCHED_CFQ is not set +CONFIG_DEFAULT_DEADLINE=y +# CONFIG_DEFAULT_CFQ is not set +# CONFIG_DEFAULT_NOOP is not set +CONFIG_DEFAULT_IOSCHED="deadline" +# CONFIG_INLINE_SPIN_TRYLOCK is not set +# CONFIG_INLINE_SPIN_TRYLOCK_BH is not set +# CONFIG_INLINE_SPIN_LOCK is not set +# CONFIG_INLINE_SPIN_LOCK_BH is not set +# CONFIG_INLINE_SPIN_LOCK_IRQ is not set +# CONFIG_INLINE_SPIN_LOCK_IRQSAVE is not set +# CONFIG_INLINE_SPIN_UNLOCK is not set +# CONFIG_INLINE_SPIN_UNLOCK_BH is not set +# CONFIG_INLINE_SPIN_UNLOCK_IRQ is not set +# CONFIG_INLINE_SPIN_UNLOCK_IRQRESTORE is not set +# CONFIG_INLINE_READ_TRYLOCK is not set +# CONFIG_INLINE_READ_LOCK is not set +# CONFIG_INLINE_READ_LOCK_BH is not set +# CONFIG_INLINE_READ_LOCK_IRQ is not set +# CONFIG_INLINE_READ_LOCK_IRQSAVE is not set +# CONFIG_INLINE_READ_UNLOCK is not set +# CONFIG_INLINE_READ_UNLOCK_BH is not set +# CONFIG_INLINE_READ_UNLOCK_IRQ is not set +# CONFIG_INLINE_READ_UNLOCK_IRQRESTORE is not set +# CONFIG_INLINE_WRITE_TRYLOCK is not set +# CONFIG_INLINE_WRITE_LOCK is not set +# CONFIG_INLINE_WRITE_LOCK_BH is not set +# CONFIG_INLINE_WRITE_LOCK_IRQ is not set +# CONFIG_INLINE_WRITE_LOCK_IRQSAVE is not set +# CONFIG_INLINE_WRITE_UNLOCK is not set +# CONFIG_INLINE_WRITE_UNLOCK_BH is not set +# CONFIG_INLINE_WRITE_UNLOCK_IRQ is not set +# CONFIG_INLINE_WRITE_UNLOCK_IRQRESTORE is not set +# CONFIG_MUTEX_SPIN_ON_OWNER is not set +# CONFIG_FREEZER is not set + +# +# System Type +# +CONFIG_MMU=y +# CONFIG_ARCH_AAEC2000 is not set +# CONFIG_ARCH_INTEGRATOR is not set +# CONFIG_ARCH_REALVIEW is not set +# CONFIG_ARCH_VERSATILE is not set +# CONFIG_ARCH_VEXPRESS is not set +# CONFIG_ARCH_AT91 is not set +# CONFIG_ARCH_BCMRING is not set +# CONFIG_ARCH_CLPS711X is not set +# CONFIG_ARCH_CNS3XXX is not set +# CONFIG_ARCH_GEMINI is not set +# CONFIG_ARCH_EBSA110 is not set +# CONFIG_ARCH_EP93XX is not set +# CONFIG_ARCH_FOOTBRIDGE is not set +# CONFIG_ARCH_MXC is not set +# CONFIG_ARCH_STMP3XXX is not set +# CONFIG_ARCH_NETX is not set +# CONFIG_ARCH_H720X is not set +# CONFIG_ARCH_IOP13XX is not set +# CONFIG_ARCH_IOP32X is not set +# CONFIG_ARCH_IOP33X is not set +# CONFIG_ARCH_IXP23XX is not set +# CONFIG_ARCH_IXP2000 is not set +# CONFIG_ARCH_IXP4XX is not set +# CONFIG_ARCH_L7200 is not set +# CONFIG_ARCH_DOVE is not set +# CONFIG_ARCH_KIRKWOOD is not set +# CONFIG_ARCH_LOKI is not set +# CONFIG_ARCH_MV78XX0 is not set +# CONFIG_ARCH_ORION5X is not set +# CONFIG_ARCH_MMP is not set +# CONFIG_ARCH_KS8695 is not set +# CONFIG_ARCH_NS9XXX is not set +# CONFIG_ARCH_W90X900 is not set +# CONFIG_ARCH_NUC93X is not set +# CONFIG_ARCH_PNX4008 is not set +# CONFIG_ARCH_PXA is not set +# CONFIG_ARCH_MSM is not set +# CONFIG_ARCH_SHMOBILE is not set +# CONFIG_ARCH_RPC is not set +# CONFIG_ARCH_SA1100 is not set +# CONFIG_ARCH_S3C2410 is not set +# CONFIG_ARCH_S3C64XX is not set +# CONFIG_ARCH_S5P6440 is not set +# CONFIG_ARCH_S5P6442 is not set +# CONFIG_ARCH_S5PC100 is not set +# CONFIG_ARCH_S5PV210 is not set +# CONFIG_ARCH_SHARK is not set +# CONFIG_ARCH_LH7A40X is not set +# CONFIG_ARCH_U300 is not set +CONFIG_PLAT_U6XXX=y +# CONFIG_ARCH_U8500 is not set +# CONFIG_ARCH_NOMADIK is not set +# CONFIG_ARCH_DAVINCI is not set +# CONFIG_ARCH_OMAP is not set +# CONFIG_PLAT_SPEAR is not set + +# +# STE U6XXX Implementations +# +CONFIG_ARCH_U67XX=y +CONFIG_U6_MTU_TIMER=y + +# +# U67XX Board Type +# +CONFIG_MACH_U67XX_WAVEC_2GB=y + +# +# Processor Type +# +CONFIG_CPU_ARM926T=y +CONFIG_CPU_32v5=y +CONFIG_CPU_ABRT_EV5TJ=y +CONFIG_CPU_PABRT_LEGACY=y +CONFIG_CPU_CACHE_VIVT=y +CONFIG_CPU_COPY_V4WB=y +CONFIG_CPU_TLB_V4WBI=y +CONFIG_CPU_CP15=y +CONFIG_CPU_CP15_MMU=y + +# +# Processor Features +# +CONFIG_ARM_THUMB=y +# CONFIG_CPU_ICACHE_DISABLE is not set +# CONFIG_CPU_DCACHE_DISABLE is not set +# CONFIG_CPU_DCACHE_WRITETHROUGH is not set +# CONFIG_CPU_CACHE_ROUND_ROBIN is not set +CONFIG_ARM_L1_CACHE_SHIFT=5 + +# +# Bus support +# +# CONFIG_PCI_SYSCALL is not set +# CONFIG_ARCH_SUPPORTS_MSI is not set +# CONFIG_PCCARD is not set + +# +# Kernel Features +# +CONFIG_TICK_ONESHOT=y +CONFIG_NO_HZ=y +CONFIG_HIGH_RES_TIMERS=y +CONFIG_GENERIC_CLOCKEVENTS_BUILD=y +CONFIG_VMSPLIT_3G=y +# CONFIG_VMSPLIT_2G is not set +# CONFIG_VMSPLIT_1G is not set +CONFIG_PAGE_OFFSET=0xC0000000 +# CONFIG_PREEMPT_NONE is not set +# CONFIG_PREEMPT_VOLUNTARY is not set +CONFIG_PREEMPT=y +CONFIG_HZ=100 +CONFIG_AEABI=y +CONFIG_OABI_COMPAT=y +# CONFIG_ARCH_SPARSEMEM_DEFAULT is not set +# CONFIG_ARCH_SELECT_MEMORY_MODEL is not set +# CONFIG_HIGHMEM is not set +CONFIG_SELECT_MEMORY_MODEL=y +CONFIG_FLATMEM_MANUAL=y +# CONFIG_DISCONTIGMEM_MANUAL is not set +# CONFIG_SPARSEMEM_MANUAL is not set +CONFIG_FLATMEM=y +CONFIG_FLAT_NODE_MEM_MAP=y +CONFIG_PAGEFLAGS_EXTENDED=y +CONFIG_SPLIT_PTLOCK_CPUS=999999 +# CONFIG_PHYS_ADDR_T_64BIT is not set +CONFIG_ZONE_DMA_FLAG=0 +CONFIG_VIRT_TO_BUS=y +# CONFIG_KSM is not set +CONFIG_DEFAULT_MMAP_MIN_ADDR=4096 +CONFIG_ALIGNMENT_TRAP=y +# CONFIG_UACCESS_WITH_MEMCPY is not set + +# +# Boot options +# +CONFIG_ZBOOT_ROM_TEXT=0x0 +CONFIG_ZBOOT_ROM_BSS=0 +# CONFIG_ZBOOT_ROM is not set +CONFIG_CMDLINE="console=ttyS0,115200n8 quiet initrd=0x26000000 rootfstype=ext2 root=/dev/ram0" +# CONFIG_CMDLINE_FORCE is not set +# CONFIG_XIP_KERNEL is not set +# CONFIG_KEXEC is not set + +# +# CPU Power Management +# +# CONFIG_CPU_IDLE is not set + +# +# Floating point emulation +# + +# +# At least one emulation must be selected +# +CONFIG_FPE_NWFPE=y +# CONFIG_FPE_NWFPE_XP is not set +# CONFIG_FPE_FASTFPE is not set +# CONFIG_VFP is not set + +# +# Userspace binary formats +# +CONFIG_BINFMT_ELF=y +# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set +CONFIG_HAVE_AOUT=y +# CONFIG_BINFMT_AOUT is not set +# CONFIG_BINFMT_MISC is not set + +# +# Power management options +# +# CONFIG_PM is not set +CONFIG_ARCH_SUSPEND_POSSIBLE=y +CONFIG_NET=y + +# +# Networking options +# +CONFIG_PACKET=y +CONFIG_UNIX=y +CONFIG_XFRM=y +# CONFIG_XFRM_USER is not set +# CONFIG_XFRM_SUB_POLICY is not set +# CONFIG_XFRM_MIGRATE is not set +# CONFIG_XFRM_STATISTICS is not set +# CONFIG_NET_KEY is not set +CONFIG_INET=y +CONFIG_IP_MULTICAST=y +# CONFIG_IP_ADVANCED_ROUTER is not set +CONFIG_IP_FIB_HASH=y +CONFIG_IP_PNP=y +CONFIG_IP_PNP_DHCP=y +# CONFIG_IP_PNP_BOOTP is not set +# CONFIG_IP_PNP_RARP is not set +# CONFIG_NET_IPIP is not set +# CONFIG_NET_IPGRE is not set +# CONFIG_IP_MROUTE is not set +# CONFIG_ARPD is not set +# CONFIG_SYN_COOKIES is not set +# CONFIG_INET_AH is not set +# CONFIG_INET_ESP is not set +# CONFIG_INET_IPCOMP is not set +# CONFIG_INET_XFRM_TUNNEL is not set +# CONFIG_INET_TUNNEL is not set +CONFIG_INET_XFRM_MODE_TRANSPORT=y +CONFIG_INET_XFRM_MODE_TUNNEL=y +CONFIG_INET_XFRM_MODE_BEET=y +# CONFIG_INET_LRO is not set +CONFIG_INET_DIAG=y +CONFIG_INET_TCP_DIAG=y +# CONFIG_TCP_CONG_ADVANCED is not set +CONFIG_TCP_CONG_CUBIC=y +CONFIG_DEFAULT_TCP_CONG="cubic" +# CONFIG_TCP_MD5SIG is not set +# CONFIG_IPV6 is not set +# CONFIG_NETWORK_SECMARK is not set +# CONFIG_NETFILTER is not set +# CONFIG_IP_DCCP is not set +# CONFIG_IP_SCTP is not set +# CONFIG_RDS is not set +# CONFIG_TIPC is not set +# CONFIG_ATM is not set +# CONFIG_L2TP is not set +# CONFIG_BRIDGE is not set +# CONFIG_NET_DSA is not set +# CONFIG_VLAN_8021Q is not set +# CONFIG_DECNET is not set +# CONFIG_LLC2 is not set +# CONFIG_IPX is not set +# CONFIG_ATALK is not set +# CONFIG_X25 is not set +# CONFIG_LAPB is not set +# CONFIG_ECONET is not set +# CONFIG_WAN_ROUTER is not set +# CONFIG_PHONET is not set +# CONFIG_IEEE802154 is not set +# CONFIG_NET_SCHED is not set +# CONFIG_DCB is not set + +# +# Network testing +# +# CONFIG_NET_PKTGEN is not set +# CONFIG_HAMRADIO is not set +# CONFIG_CAN is not set +# CONFIG_IRDA is not set +# CONFIG_BT is not set +# CONFIG_AF_RXRPC is not set +# CONFIG_WIRELESS is not set +# CONFIG_WIMAX is not set +# CONFIG_RFKILL is not set +# CONFIG_NET_9P is not set +# CONFIG_CAIF is not set + +# +# Device Drivers +# + +# +# Generic Driver Options +# +CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" +# CONFIG_DEVTMPFS is not set +CONFIG_STANDALONE=y +CONFIG_PREVENT_FIRMWARE_BUILD=y +# CONFIG_FW_LOADER is not set +# CONFIG_DEBUG_DRIVER is not set +# CONFIG_DEBUG_DEVRES is not set +# CONFIG_SYS_HYPERVISOR is not set +# CONFIG_CONNECTOR is not set +# CONFIG_MTD is not set +# CONFIG_PARPORT is not set +CONFIG_BLK_DEV=y +# CONFIG_BLK_DEV_COW_COMMON is not set +CONFIG_BLK_DEV_LOOP=y +# CONFIG_BLK_DEV_CRYPTOLOOP is not set + +# +# DRBD disabled because PROC_FS, INET or CONNECTOR not selected +# +# CONFIG_BLK_DEV_NBD is not set +CONFIG_BLK_DEV_RAM=y +CONFIG_BLK_DEV_RAM_COUNT=2 +CONFIG_BLK_DEV_RAM_SIZE=32768 +# CONFIG_BLK_DEV_XIP is not set +# CONFIG_CDROM_PKTCDVD is not set +# CONFIG_ATA_OVER_ETH is not set +# CONFIG_MG_DISK is not set +# CONFIG_MISC_DEVICES is not set +CONFIG_HAVE_IDE=y +# CONFIG_IDE is not set + +# +# SCSI device support +# +CONFIG_SCSI_MOD=m +# CONFIG_RAID_ATTRS is not set +CONFIG_SCSI=m +CONFIG_SCSI_DMA=y +# CONFIG_SCSI_TGT is not set +# CONFIG_SCSI_NETLINK is not set +CONFIG_SCSI_PROC_FS=y + +# +# SCSI support type (disk, tape, CD-ROM) +# +CONFIG_BLK_DEV_SD=m +# CONFIG_CHR_DEV_ST is not set +# CONFIG_CHR_DEV_OSST is not set +# CONFIG_BLK_DEV_SR is not set +# CONFIG_CHR_DEV_SG is not set +# CONFIG_CHR_DEV_SCH is not set +CONFIG_SCSI_MULTI_LUN=y +# CONFIG_SCSI_CONSTANTS is not set +# CONFIG_SCSI_LOGGING is not set +# CONFIG_SCSI_SCAN_ASYNC is not set +CONFIG_SCSI_WAIT_SCAN=m + +# +# SCSI Transports +# +# CONFIG_SCSI_SPI_ATTRS is not set +# CONFIG_SCSI_FC_ATTRS is not set +# CONFIG_SCSI_ISCSI_ATTRS is not set +# CONFIG_SCSI_SAS_LIBSAS is not set +# CONFIG_SCSI_SRP_ATTRS is not set +CONFIG_SCSI_LOWLEVEL=y +# CONFIG_ISCSI_TCP is not set +# CONFIG_LIBFC is not set +# CONFIG_LIBFCOE is not set +# CONFIG_SCSI_DEBUG is not set +# CONFIG_SCSI_DH is not set +# CONFIG_SCSI_OSD_INITIATOR is not set +# CONFIG_ATA is not set +# CONFIG_MD is not set +# CONFIG_NETDEVICES is not set +# CONFIG_ISDN is not set +# CONFIG_PHONE is not set + +# +# Input device support +# +CONFIG_INPUT=y +# CONFIG_INPUT_FF_MEMLESS is not set +# CONFIG_INPUT_POLLDEV is not set +# CONFIG_INPUT_SPARSEKMAP is not set + +# +# Userland interfaces +# +# CONFIG_INPUT_MOUSEDEV is not set +# CONFIG_INPUT_JOYDEV is not set +CONFIG_INPUT_EVDEV=y +# CONFIG_INPUT_EVBUG is not set + +# +# Input Device Drivers +# +CONFIG_INPUT_KEYBOARD=y +# CONFIG_KEYBOARD_ATKBD is not set +# CONFIG_KEYBOARD_LKKBD is not set +# CONFIG_KEYBOARD_GPIO is not set +# CONFIG_KEYBOARD_MATRIX is not set +# CONFIG_KEYBOARD_NEWTON is not set +# CONFIG_KEYBOARD_OPENCORES is not set +# CONFIG_KEYBOARD_STOWAWAY is not set +# CONFIG_KEYBOARD_SUNKBD is not set +# CONFIG_KEYBOARD_XTKBD is not set +# CONFIG_INPUT_MOUSE is not set +# CONFIG_INPUT_JOYSTICK is not set +# CONFIG_INPUT_TABLET is not set +# CONFIG_INPUT_TOUCHSCREEN is not set +# CONFIG_INPUT_MISC is not set + +# +# Hardware I/O ports +# +CONFIG_SERIO=y +# CONFIG_SERIO_SERPORT is not set +# CONFIG_SERIO_LIBPS2 is not set +# CONFIG_SERIO_RAW is not set +# CONFIG_SERIO_ALTERA_PS2 is not set +# CONFIG_GAMEPORT is not set + +# +# Character devices +# +CONFIG_VT=y +CONFIG_CONSOLE_TRANSLATIONS=y +CONFIG_VT_CONSOLE=y +CONFIG_HW_CONSOLE=y +# CONFIG_VT_HW_CONSOLE_BINDING is not set +CONFIG_DEVKMEM=y +# CONFIG_SERIAL_NONSTANDARD is not set +# CONFIG_N_GSM is not set + +# +# Serial drivers +# +CONFIG_SERIAL_8250=y +CONFIG_SERIAL_8250_CONSOLE=y +CONFIG_SERIAL_8250_NR_UARTS=2 +CONFIG_SERIAL_8250_RUNTIME_UARTS=2 +CONFIG_SERIAL_8250_EXTENDED=y +# CONFIG_SERIAL_8250_MANY_PORTS is not set +CONFIG_SERIAL_8250_U6XXX=y +CONFIG_SERIAL_8250_CUSTOM_CLOCK=y +CONFIG_SERIAL_8250_CUSTOM_MAX_BAUDRATE=3250000 +# CONFIG_SERIAL_8250_SHARE_IRQ is not set +# CONFIG_SERIAL_8250_DETECT_IRQ is not set +# CONFIG_SERIAL_8250_RSA is not set + +# +# Non-8250 serial port support +# +CONFIG_SERIAL_CORE=y +CONFIG_SERIAL_CORE_CONSOLE=y +# CONFIG_SERIAL_TIMBERDALE is not set +# CONFIG_SERIAL_ALTERA_JTAGUART is not set +# CONFIG_SERIAL_ALTERA_UART is not set +CONFIG_UNIX98_PTYS=y +# CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set +CONFIG_LEGACY_PTYS=y +CONFIG_LEGACY_PTY_COUNT=16 +# CONFIG_IPMI_HANDLER is not set +CONFIG_HW_RANDOM=y +# CONFIG_HW_RANDOM_TIMERIOMEM is not set +# CONFIG_R3964 is not set +# CONFIG_RAW_DRIVER is not set +# CONFIG_TCG_TPM is not set +# CONFIG_I2C is not set +# CONFIG_SPI is not set + +# +# PPS support +# +# CONFIG_PPS is not set +CONFIG_ARCH_REQUIRE_GPIOLIB=y +CONFIG_GPIOLIB=y +# CONFIG_DEBUG_GPIO is not set +# CONFIG_GPIO_SYSFS is not set + +# +# Memory mapped GPIO expanders: +# +# CONFIG_GPIO_IT8761E is not set + +# +# I2C GPIO expanders: +# + +# +# PCI GPIO expanders: +# + +# +# SPI GPIO expanders: +# + +# +# AC97 GPIO expanders: +# + +# +# MODULbus GPIO expanders: +# +# CONFIG_W1 is not set +# CONFIG_POWER_SUPPLY is not set +# CONFIG_HWMON is not set +# CONFIG_THERMAL is not set +# CONFIG_WATCHDOG is not set +CONFIG_SSB_POSSIBLE=y + +# +# Sonics Silicon Backplane +# +# CONFIG_SSB is not set +CONFIG_MFD_SUPPORT=y +# CONFIG_MFD_CORE is not set +# CONFIG_MFD_SM501 is not set +# CONFIG_MFD_ASIC3 is not set +# CONFIG_HTC_EGPIO is not set +# CONFIG_HTC_PASIC3 is not set +# CONFIG_MFD_TMIO is not set +# CONFIG_MFD_TC6393XB is not set +# CONFIG_ABX500_CORE is not set +# CONFIG_REGULATOR is not set +# CONFIG_MEDIA_SUPPORT is not set + +# +# Graphics support +# +# CONFIG_VGASTATE is not set +# CONFIG_VIDEO_OUTPUT_CONTROL is not set +CONFIG_FB=y +# CONFIG_FIRMWARE_EDID is not set +# CONFIG_FB_DDC is not set +# CONFIG_FB_BOOT_VESA_SUPPORT is not set +# CONFIG_FB_CFB_FILLRECT is not set +# CONFIG_FB_CFB_COPYAREA is not set +# CONFIG_FB_CFB_IMAGEBLIT is not set +# CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set +# CONFIG_FB_SYS_FILLRECT is not set +# CONFIG_FB_SYS_COPYAREA is not set +# CONFIG_FB_SYS_IMAGEBLIT is not set +# CONFIG_FB_FOREIGN_ENDIAN is not set +# CONFIG_FB_SYS_FOPS is not set +# CONFIG_FB_SVGALIB is not set +# CONFIG_FB_MACMODES is not set +# CONFIG_FB_BACKLIGHT is not set +# CONFIG_FB_MODE_HELPERS is not set +# CONFIG_FB_TILEBLITTING is not set + +# +# Frame buffer hardware drivers +# +# CONFIG_FB_S1D13XXX is not set +# CONFIG_FB_VIRTUAL is not set +# CONFIG_FB_METRONOME is not set +# CONFIG_FB_MB862XX is not set +# CONFIG_FB_BROADSHEET is not set +CONFIG_BACKLIGHT_LCD_SUPPORT=y +CONFIG_LCD_CLASS_DEVICE=y +CONFIG_LCD_PLATFORM=y +CONFIG_BACKLIGHT_CLASS_DEVICE=y +CONFIG_BACKLIGHT_GENERIC=y + +# +# Display device support +# +# CONFIG_DISPLAY_SUPPORT is not set + +# +# Console display driver support +# +# CONFIG_VGA_CONSOLE is not set +CONFIG_DUMMY_CONSOLE=y +# CONFIG_FRAMEBUFFER_CONSOLE is not set +# CONFIG_LOGO is not set +# CONFIG_SOUND is not set +# CONFIG_HID_SUPPORT is not set +# CONFIG_USB_SUPPORT is not set +# CONFIG_MMC is not set +# CONFIG_MEMSTICK is not set +# CONFIG_NEW_LEDS is not set +# CONFIG_ACCESSIBILITY is not set +CONFIG_RTC_LIB=y +# CONFIG_RTC_CLASS is not set +# CONFIG_DMADEVICES is not set +# CONFIG_AUXDISPLAY is not set +# CONFIG_UIO is not set +# CONFIG_STAGING is not set + +# +# File systems +# +CONFIG_EXT2_FS=y +# CONFIG_EXT2_FS_XATTR is not set +# CONFIG_EXT2_FS_XIP is not set +# CONFIG_EXT3_FS is not set +# CONFIG_EXT4_FS is not set +# CONFIG_REISERFS_FS is not set +# CONFIG_JFS_FS is not set +CONFIG_FS_POSIX_ACL=y +# CONFIG_XFS_FS is not set +# CONFIG_GFS2_FS is not set +# CONFIG_OCFS2_FS is not set +# CONFIG_BTRFS_FS is not set +# CONFIG_NILFS2_FS is not set +CONFIG_FILE_LOCKING=y +CONFIG_FSNOTIFY=y +CONFIG_DNOTIFY=y +CONFIG_INOTIFY_USER=y +CONFIG_FANOTIFY=y +# CONFIG_QUOTA is not set +# CONFIG_AUTOFS_FS is not set +# CONFIG_AUTOFS4_FS is not set +# CONFIG_FUSE_FS is not set +CONFIG_GENERIC_ACL=y + +# +# Caches +# +# CONFIG_FSCACHE is not set + +# +# CD-ROM/DVD Filesystems +# +# CONFIG_ISO9660_FS is not set +# CONFIG_UDF_FS is not set + +# +# DOS/FAT/NT Filesystems +# +CONFIG_FAT_FS=y +CONFIG_MSDOS_FS=y +CONFIG_VFAT_FS=y +CONFIG_FAT_DEFAULT_CODEPAGE=437 +CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-15" +# CONFIG_NTFS_FS is not set + +# +# Pseudo filesystems +# +CONFIG_PROC_FS=y +CONFIG_PROC_SYSCTL=y +CONFIG_PROC_PAGE_MONITOR=y +CONFIG_SYSFS=y +CONFIG_TMPFS=y +CONFIG_TMPFS_POSIX_ACL=y +# CONFIG_HUGETLB_PAGE is not set +# CONFIG_CONFIGFS_FS is not set +CONFIG_MISC_FILESYSTEMS=y +# CONFIG_ADFS_FS is not set +# CONFIG_AFFS_FS is not set +# CONFIG_HFS_FS is not set +# CONFIG_HFSPLUS_FS is not set +# CONFIG_BEFS_FS is not set +# CONFIG_BFS_FS is not set +# CONFIG_EFS_FS is not set +# CONFIG_LOGFS is not set +# CONFIG_CRAMFS is not set +CONFIG_SQUASHFS=y +# CONFIG_SQUASHFS_XATTRS is not set +# CONFIG_SQUASHFS_EMBEDDED is not set +CONFIG_SQUASHFS_FRAGMENT_CACHE_SIZE=3 +# CONFIG_VXFS_FS is not set +# CONFIG_MINIX_FS is not set +# CONFIG_OMFS_FS is not set +# CONFIG_HPFS_FS is not set +# CONFIG_QNX4FS_FS is not set +# CONFIG_ROMFS_FS is not set +# CONFIG_SYSV_FS is not set +# CONFIG_UFS_FS is not set +CONFIG_NETWORK_FILESYSTEMS=y +CONFIG_NFS_FS=y +CONFIG_NFS_V3=y +# CONFIG_NFS_V3_ACL is not set +# CONFIG_NFS_V4 is not set +# CONFIG_ROOT_NFS is not set +# CONFIG_NFSD is not set +CONFIG_LOCKD=y +CONFIG_LOCKD_V4=y +CONFIG_NFS_COMMON=y +CONFIG_SUNRPC=y +# CONFIG_RPCSEC_GSS_KRB5 is not set +# CONFIG_RPCSEC_GSS_SPKM3 is not set +# CONFIG_SMB_FS is not set +# CONFIG_CEPH_FS is not set +# CONFIG_CIFS is not set +# CONFIG_NCP_FS is not set +# CONFIG_CODA_FS is not set +# CONFIG_AFS_FS is not set + +# +# Partition Types +# +# CONFIG_PARTITION_ADVANCED is not set +CONFIG_MSDOS_PARTITION=y +CONFIG_NLS=y +CONFIG_NLS_DEFAULT="iso8859-15" +CONFIG_NLS_CODEPAGE_437=y +# CONFIG_NLS_CODEPAGE_737 is not set +# CONFIG_NLS_CODEPAGE_775 is not set +CONFIG_NLS_CODEPAGE_850=y +# CONFIG_NLS_CODEPAGE_852 is not set +# CONFIG_NLS_CODEPAGE_855 is not set +# CONFIG_NLS_CODEPAGE_857 is not set +# CONFIG_NLS_CODEPAGE_860 is not set +# CONFIG_NLS_CODEPAGE_861 is not set +# CONFIG_NLS_CODEPAGE_862 is not set +# CONFIG_NLS_CODEPAGE_863 is not set +# CONFIG_NLS_CODEPAGE_864 is not set +# CONFIG_NLS_CODEPAGE_865 is not set +# CONFIG_NLS_CODEPAGE_866 is not set +# CONFIG_NLS_CODEPAGE_869 is not set +# CONFIG_NLS_CODEPAGE_936 is not set +# CONFIG_NLS_CODEPAGE_950 is not set +# CONFIG_NLS_CODEPAGE_932 is not set +# CONFIG_NLS_CODEPAGE_949 is not set +# CONFIG_NLS_CODEPAGE_874 is not set +# CONFIG_NLS_ISO8859_8 is not set +# CONFIG_NLS_CODEPAGE_1250 is not set +# CONFIG_NLS_CODEPAGE_1251 is not set +# CONFIG_NLS_ASCII is not set +CONFIG_NLS_ISO8859_1=y +# CONFIG_NLS_ISO8859_2 is not set +# CONFIG_NLS_ISO8859_3 is not set +# CONFIG_NLS_ISO8859_4 is not set +# CONFIG_NLS_ISO8859_5 is not set +# CONFIG_NLS_ISO8859_6 is not set +# CONFIG_NLS_ISO8859_7 is not set +# CONFIG_NLS_ISO8859_9 is not set +# CONFIG_NLS_ISO8859_13 is not set +# CONFIG_NLS_ISO8859_14 is not set +CONFIG_NLS_ISO8859_15=y +# CONFIG_NLS_KOI8_R is not set +# CONFIG_NLS_KOI8_U is not set +# CONFIG_NLS_UTF8 is not set +# CONFIG_DLM is not set + +# +# Kernel hacking +# +CONFIG_PRINTK_TIME=y +CONFIG_ENABLE_WARN_DEPRECATED=y +CONFIG_ENABLE_MUST_CHECK=y +CONFIG_FRAME_WARN=1024 +CONFIG_MAGIC_SYSRQ=y +# CONFIG_STRIP_ASM_SYMS is not set +# CONFIG_UNUSED_SYMBOLS is not set +CONFIG_DEBUG_FS=y +# CONFIG_HEADERS_CHECK is not set +CONFIG_DEBUG_KERNEL=y +# CONFIG_DEBUG_SHIRQ is not set +CONFIG_LOCKUP_DETECTOR=y +# CONFIG_HARDLOCKUP_DETECTOR is not set +# CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC is not set +CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC_VALUE=0 +CONFIG_DETECT_HUNG_TASK=y +# CONFIG_BOOTPARAM_HUNG_TASK_PANIC is not set +CONFIG_BOOTPARAM_HUNG_TASK_PANIC_VALUE=0 +# CONFIG_SCHED_DEBUG is not set +# CONFIG_SCHEDSTATS is not set +CONFIG_TIMER_STATS=y +# CONFIG_DEBUG_OBJECTS is not set +# CONFIG_DEBUG_KMEMLEAK is not set +CONFIG_DEBUG_PREEMPT=y +CONFIG_DEBUG_RT_MUTEXES=y +CONFIG_DEBUG_PI_LIST=y +# CONFIG_RT_MUTEX_TESTER is not set +# CONFIG_DEBUG_SPINLOCK is not set +CONFIG_DEBUG_MUTEXES=y +# CONFIG_DEBUG_LOCK_ALLOC is not set +# CONFIG_PROVE_LOCKING is not set +# CONFIG_LOCK_STAT is not set +# CONFIG_DEBUG_SPINLOCK_SLEEP is not set +# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set +# CONFIG_DEBUG_KOBJECT is not set +CONFIG_DEBUG_BUGVERBOSE=y +CONFIG_DEBUG_INFO=y +CONFIG_DEBUG_VM=y +# CONFIG_DEBUG_WRITECOUNT is not set +# CONFIG_DEBUG_MEMORY_INIT is not set +# CONFIG_DEBUG_LIST is not set +# CONFIG_DEBUG_SG is not set +# CONFIG_DEBUG_NOTIFIERS is not set +# CONFIG_DEBUG_CREDENTIALS is not set +CONFIG_FRAME_POINTER=y +# CONFIG_BOOT_PRINTK_DELAY is not set +# CONFIG_RCU_TORTURE_TEST is not set +# CONFIG_RCU_CPU_STALL_DETECTOR is not set +# CONFIG_BACKTRACE_SELF_TEST is not set +# CONFIG_DEBUG_BLOCK_EXT_DEVT is not set +# CONFIG_DEBUG_FORCE_WEAK_PER_CPU is not set +# CONFIG_LKDTM is not set +# CONFIG_FAULT_INJECTION is not set +# CONFIG_LATENCYTOP is not set +# CONFIG_SYSCTL_SYSCALL_CHECK is not set +# CONFIG_PAGE_POISONING is not set +CONFIG_HAVE_FUNCTION_TRACER=y +CONFIG_RING_BUFFER=y +CONFIG_RING_BUFFER_ALLOW_SWAP=y +CONFIG_TRACING_SUPPORT=y +CONFIG_FTRACE=y +# CONFIG_FUNCTION_TRACER is not set +# CONFIG_IRQSOFF_TRACER is not set +# CONFIG_PREEMPT_TRACER is not set +# CONFIG_SCHED_TRACER is not set +# CONFIG_ENABLE_DEFAULT_TRACERS is not set +# CONFIG_BOOT_TRACER is not set +CONFIG_BRANCH_PROFILE_NONE=y +# CONFIG_PROFILE_ANNOTATED_BRANCHES is not set +# CONFIG_PROFILE_ALL_BRANCHES is not set +# CONFIG_STACK_TRACER is not set +# CONFIG_KMEMTRACE is not set +# CONFIG_WORKQUEUE_TRACER is not set +# CONFIG_BLK_DEV_IO_TRACE is not set +# CONFIG_RING_BUFFER_BENCHMARK is not set +# CONFIG_DYNAMIC_DEBUG is not set +# CONFIG_ATOMIC64_SELFTEST is not set +# CONFIG_SAMPLES is not set +CONFIG_HAVE_ARCH_KGDB=y +# CONFIG_KGDB is not set +# CONFIG_ARM_UNWIND is not set +CONFIG_DEBUG_USER=y +CONFIG_DEBUG_ERRORS=y +# CONFIG_DEBUG_STACK_USAGE is not set +# CONFIG_DEBUG_LL is not set +# CONFIG_OC_ETM is not set + +# +# Security options +# +# CONFIG_KEYS is not set +# CONFIG_SECURITY is not set +# CONFIG_SECURITYFS is not set +# CONFIG_DEFAULT_SECURITY_SELINUX is not set +# CONFIG_DEFAULT_SECURITY_SMACK is not set +# CONFIG_DEFAULT_SECURITY_TOMOYO is not set +CONFIG_DEFAULT_SECURITY_DAC=y +CONFIG_DEFAULT_SECURITY="" +CONFIG_CRYPTO=y + +# +# Crypto core or helper +# +# CONFIG_CRYPTO_MANAGER is not set +# CONFIG_CRYPTO_MANAGER2 is not set +# CONFIG_CRYPTO_GF128MUL is not set +# CONFIG_CRYPTO_NULL is not set +# CONFIG_CRYPTO_CRYPTD is not set +# CONFIG_CRYPTO_AUTHENC is not set +# CONFIG_CRYPTO_TEST is not set + +# +# Authenticated Encryption with Associated Data +# +# CONFIG_CRYPTO_CCM is not set +# CONFIG_CRYPTO_GCM is not set +# CONFIG_CRYPTO_SEQIV is not set + +# +# Block modes +# +# CONFIG_CRYPTO_CBC is not set +# CONFIG_CRYPTO_CTR is not set +# CONFIG_CRYPTO_CTS is not set +# CONFIG_CRYPTO_ECB is not set +# CONFIG_CRYPTO_LRW is not set +# CONFIG_CRYPTO_PCBC is not set +# CONFIG_CRYPTO_XTS is not set + +# +# Hash modes +# +# CONFIG_CRYPTO_HMAC is not set +# CONFIG_CRYPTO_XCBC is not set +# CONFIG_CRYPTO_VMAC is not set + +# +# Digest +# +# CONFIG_CRYPTO_CRC32C is not set +# CONFIG_CRYPTO_GHASH is not set +# CONFIG_CRYPTO_MD4 is not set +# CONFIG_CRYPTO_MD5 is not set +# CONFIG_CRYPTO_MICHAEL_MIC is not set +# CONFIG_CRYPTO_RMD128 is not set +# CONFIG_CRYPTO_RMD160 is not set +# CONFIG_CRYPTO_RMD256 is not set +# CONFIG_CRYPTO_RMD320 is not set +# CONFIG_CRYPTO_SHA1 is not set +# CONFIG_CRYPTO_SHA256 is not set +# CONFIG_CRYPTO_SHA512 is not set +# CONFIG_CRYPTO_TGR192 is not set +# CONFIG_CRYPTO_WP512 is not set + +# +# Ciphers +# +# CONFIG_CRYPTO_AES is not set +# CONFIG_CRYPTO_ANUBIS is not set +# CONFIG_CRYPTO_ARC4 is not set +# CONFIG_CRYPTO_BLOWFISH is not set +# CONFIG_CRYPTO_CAMELLIA is not set +# CONFIG_CRYPTO_CAST5 is not set +# CONFIG_CRYPTO_CAST6 is not set +# CONFIG_CRYPTO_DES is not set +# CONFIG_CRYPTO_FCRYPT is not set +# CONFIG_CRYPTO_KHAZAD is not set +# CONFIG_CRYPTO_SALSA20 is not set +# CONFIG_CRYPTO_SEED is not set +# CONFIG_CRYPTO_SERPENT is not set +# CONFIG_CRYPTO_TEA is not set +# CONFIG_CRYPTO_TWOFISH is not set + +# +# Compression +# +# CONFIG_CRYPTO_DEFLATE is not set +# CONFIG_CRYPTO_ZLIB is not set +# CONFIG_CRYPTO_LZO is not set + +# +# Random Number Generation +# +# CONFIG_CRYPTO_ANSI_CPRNG is not set +# CONFIG_CRYPTO_HW is not set +# CONFIG_BINARY_PRINTF is not set + +# +# Library routines +# +CONFIG_BITREVERSE=y +CONFIG_GENERIC_FIND_LAST_BIT=y +CONFIG_CRC_CCITT=y +# CONFIG_CRC16 is not set +# CONFIG_CRC_T10DIF is not set +# CONFIG_CRC_ITU_T is not set +CONFIG_CRC32=y +# CONFIG_CRC7 is not set +# CONFIG_LIBCRC32C is not set +CONFIG_ZLIB_INFLATE=y +CONFIG_DECOMPRESS_GZIP=y +CONFIG_HAS_IOMEM=y +CONFIG_HAS_IOPORT=y +CONFIG_HAS_DMA=y +CONFIG_NLATTR=y +CONFIG_GENERIC_ATOMIC64=y +# CONFIG_SHM_SIGNAL is not set +# CONFIG_IOQ is not set
Signature · 1 line
1.7.1