Update Samsung S5PC100 SoC support
Subsystems (3)
PATCH v3 1/1 Update Samsung S5PC100 SoC support
Hello,
This patch series updates Samsung S5PC100 SoC support. S5PC100 platform core has been extended with new clocks hierarchy implementation, gpio lib, support for external and gpio interrupts and some basics of power management (cpu idle and system reset). Also platform helpers for s3c framebuffer, i2c and hsmmc drivers has been added.
All these patches has been tested on SMDKC100 board.
This patch series has been prepared against latest ARM Kernel tree from
http://ftp.arm.linux.org.uk/pub/linux/arm/kernel/git-cur/linux-2.6-arm.git/
This is the third version of this patch series. I've tried to address all the issues reported by Ben and Russel.
This patch series includes:
[PATCH 01/14] ARM: S5PC1XX: registers rename
[PATCH 02/14] ARM: S5PC1XX: clock registers rename
[PATCH 03/14] ARM: S5PC1XX: clocks reimplementation
[PATCH 04/14] ARM: S5PC1XX: add GPIO L banks to register definition [PATCH 05/14] ARM: S5PC1XX: GPIO registers rename
[PATCH 06/14] ARM: S5PC1xx: add gpiolib and external/gpio interrupt support [PATCH 07/14] ARM: S5PC1XX: add cpu idle and system reset support [PATCH 08/14] ARM: S3C: Prepare s3c64xx-specific s3c-fb register definition for reuse [PATCH 09/14] ARM: S5PC1xx: add platform helpers for s3c-fb device [PATCH 10/14] SMDKC100: enable S3C FrameBuffer
[PATCH 11/14] ARM: S5PC1xx: add platform helpers for i2c adapter devices [PATCH 12/14] SMDKC100: add I2C0 and I2C1 buses support
[PATCH 13/14] ARM: S5PC1xx: add platform helpers for SDHCI host controllers [PATCH 14/14] SMDKC100: add SDHCI controllers 0, 1 and 2 support
PATCH 1/14 ARM: S5PC1XX: registers rename
From: Kyungmin Park <[email protected]>
S5PC110 and S5PC100 register maps differs in many places, rename all defined registers to be S5PC100 specific. PA_SYS register known from S3C64XX series has been renamed to more adequate PA_CLK. Also system map has been also updated to cover more integrated peripherals.
--- arch/arm/mach-s5pc100/include/mach/map.h | 87 +++++++++++++++++++++++++++-- arch/arm/mach-s5pc100/mach-smdkc100.c | 2 +- 2 files changed, 82 insertions(+), 7 deletions(-)
arch/arm/mach-s5pc100/include/mach/map.h +81 -6
@@ -17,6 +17,19 @@#include <plat/map-base.h> +/* +* map-base.h has already defined virtual memory address +* S3C_VA_IRQ S3C_ADDR(0x00000000) irq controller(s) +* S3C_VA_SYS S3C_ADDR(0x00100000) system control +* S3C_VA_MEM S3C_ADDR(0x00200000) system control (not used) +* S3C_VA_TIMER S3C_ADDR(0x00300000) timer block +* S3C_VA_WATCHDOG S3C_ADDR(0x00400000) watchdog +* S3C_VA_UART S3C_ADDR(0x01000000) UART +* +* S5PC100 specific virtual memory address can be defined here +* S5PC1XX_VA_GPIO S3C_ADDR(0x00500000) GPIO +* +*/ /* Chip ID */ #define S5PC100_PA_CHIPID (0xE0000000)
@@ -24,13 +37,20 @@#define S5PC1XX_VA_CHIPID S3C_VA_SYS/* System */ -#define S5PC100_PA_SYS (0xE0100000) -#define S5PC100_PA_CLK (S5PC100_PA_SYS + 0x0) -#define S5PC100_PA_PWR (S5PC100_PA_SYS + 0x8000) +#define S5PC100_PA_CLK (0xE0100000) +#define S5PC100_PA_CLK_OTHER (0xE0200000) +#define S5PC100_PA_PWR (0xE0108000)#define S5PC1XX_PA_CLK S5PC100_PA_CLK#define S5PC1XX_PA_PWR S5PC100_PA_PWR +#define S5PC1XX_PA_CLK_OTHER S5PC100_PA_CLK_OTHER#define S5PC1XX_VA_CLK (S3C_VA_SYS + 0x10000)#define S5PC1XX_VA_PWR (S3C_VA_SYS + 0x20000) +#define S5PC1XX_VA_CLK_OTHER (S3C_VA_SYS + 0x30000) + +/* GPIO */ +#define S5PC100_PA_GPIO (0xE0300000) +#define S5PC1XX_PA_GPIO S5PC100_PA_GPIO +#define S5PC1XX_VA_GPIO S3C_ADDR(0x00500000)/* Interrupt */ #define S5PC100_PA_VIC (0xE4000000)
@@ -40,23 +60,64 @@#define S5PC1XX_PA_VIC (x) (S5PC100_PA_VIC + ((x) * S5PC100_PA_VIC_OFFSET))#define S5PC1XX_VA_VIC (x) (S5PC100_VA_VIC + ((x) * S5PC100_VA_VIC_OFFSET)) +/* DMA */ +#define S5PC100_PA_MDMA (0xE8100000) +#define S5PC100_PA_PDMA0 (0xE9000000) +#define S5PC100_PA_PDMA1 (0xE9200000) +/* Timer */ #define S5PC100_PA_TIMER (0xEA000000)#define S5PC1XX_PA_TIMER S5PC100_PA_TIMER#define S5PC1XX_VA_TIMER S3C_VA_TIMER +/* RTC */ +#define S5PC100_PA_RTC (0xEA300000) +/* UART */ #define S5PC100_PA_UART (0xEC000000)#define S5PC1XX_PA_UART S5PC100_PA_UART#define S5PC1XX_VA_UART S3C_VA_UART -/* IIC */ -#define S5PC100_PA_IIC (0xEC100000) +/* I2C */ +#define S5PC100_PA_I2C (0xEC100000) +#define S5PC100_PA_I2C1 (0xEC200000) + +/* USB HS OTG */ +#define S5PC100_PA_USB_HSOTG (0xED200000) +#define S5PC100_PA_USB_HSPHY (0xED300000) + +/* SD/MMC */ +#define S5PC100_PA_HSMMC (x) (0xED800000 + ((x) * 0x100000)) +#define S5PC100_PA_HSMMC0 S5PC100_PA_HSMMC(0) +#define S5PC100_PA_HSMMC1 S5PC100_PA_HSMMC(1) +#define S5PC100_PA_HSMMC2 S5PC100_PA_HSMMC(2) + +/* LCD */ +#define S5PC100_PA_FB (0xEE000000) + +/* Multimedia */ +#define S5PC100_PA_G2D (0xEE800000) +#define S5PC100_PA_JPEG (0xEE500000) +#define S5PC100_PA_ROTATOR (0xEE100000) +#define S5PC100_PA_G3D (0xEF000000) + +/* I2S */ +#define S5PC100_PA_I2S0 (0xF2000000) +#define S5PC100_PA_I2S1 (0xF2100000) +#define S5PC100_PA_I2S2 (0xF2200000) + +/* KEYPAD */ +#define S5PC100_PA_KEYPAD (0xF3100000) + +/* ADC & TouchScreen */ +#define S5PC100_PA_TSADC (0xF3000000)/* ETC */ #define S5PC100_PA_SDRAM (0x20000000) +#define S5PC1XX_PA_SDRAM S5PC100_PA_SDRAM/* compatibility defines. */ +#define S3C_PA_RTC S5PC100_PA_RTC#define S3C_PA_UART S5PC100_PA_UART#define S3C_PA_UART0 (S5PC100_PA_UART + 0x0)#define S3C_PA_UART1 (S5PC100_PA_UART + 0x400)
@@ -67,9 +128,23 @@#define S3C_VA_UART2 (S3C_VA_UART + 0x800)#define S3C_VA_UART3 (S3C_VA_UART + 0xC00)#define S3C_UART_OFFSET 0x400 +#define S3C_VA_UARTx (x) (S3C_VA_UART + ((x) * S3C_UART_OFFSET)) +#define S3C_PA_FB S5PC100_PA_FB +#define S3C_PA_G2D S5PC100_PA_G2D +#define S3C_PA_G3D S5PC100_PA_G3D +#define S3C_PA_JPEG S5PC100_PA_JPEG +#define S3C_PA_ROTATOR S5PC100_PA_ROTATOR#define S3C_VA_VIC0 (S3C_VA_IRQ + 0x0)#define S3C_VA_VIC1 (S3C_VA_IRQ + 0x10000)#define S3C_VA_VIC2 (S3C_VA_IRQ + 0x20000) -#define S3C_PA_IIC S5PC100_PA_IIC +#define S3C_PA_IIC S5PC100_PA_I2C +#define S3C_PA_IIC1 S5PC100_PA_I2C1 +#define S3C_PA_USB_HSOTG S5PC100_PA_USB_HSOTG +#define S3C_PA_USB_HSPHY S5PC100_PA_USB_HSPHY +#define S3C_PA_HSMMC0 S5PC100_PA_HSMMC0 +#define S3C_PA_HSMMC1 S5PC100_PA_HSMMC1 +#define S3C_PA_HSMMC2 S5PC100_PA_HSMMC2 +#define S3C_PA_KEYPAD S5PC100_PA_KEYPAD +#define S3C_PA_TSADC S5PC100_PA_TSADC#endif /* __ASM_ARCH_C100_MAP_H */
arch/arm/mach-s5pc100/mach-smdkc100.c +1 -1
@@ -92,7 +92,7 @@ static void __init smdkc100_machine_init(void)MACHINE_START (SMDKC100 ,"SMDKC100" )/* Maintainer: Byungho Min <[email protected]> */ - .phys_io = S5PC1XX_PA_UART & 0xfff00000, + .phys_io = S5PC100_PA_UART & 0xfff00000, .io_pg_offst = (((u32)S5PC1XX_VA_UART) >> 18) & 0xfffc, .boot_params = S5PC100_PA_SDRAM + 0x100,
Signature · 1 line
1.6.4
PATCH 2/14 ARM: S5PC1XX: clock registers rename
From: Kyungmin Park <[email protected]>
S5PC100 and S5PC110 clock registers differs in many places, rename all previously defined registers to be S5PC100 specific. Remove all power management registers. They will be added later to a separate file.
--- arch/arm/plat-s5pc1xx/include/plat/regs-clock.h | 212 ++++++++--------------- arch/arm/plat-s5pc1xx/s5pc100-clock.c | 44 +++--- 2 files changed, 97 insertions(+), 159 deletions(-)
arch/arm/plat-s5pc1xx/include/plat/regs-clock.h +75 -137
@@ -13,68 +13,69 @@#ifndef __PLAT_REGS_CLOCK_H#define __PLAT_REGS_CLOCK_H __FILE__ -#define S5PC1XX_CLKREG (x) (S5PC1XX_VA_CLK + (x)) - -#define S5PC1XX_APLL_LOCK S5PC1XX_CLKREG(0x00) -#define S5PC1XX_MPLL_LOCK S5PC1XX_CLKREG(0x04) -#define S5PC1XX_EPLL_LOCK S5PC1XX_CLKREG(0x08) -#define S5PC100_HPLL_LOCK S5PC1XX_CLKREG(0x0C) - -#define S5PC1XX_APLL_CON S5PC1XX_CLKREG(0x100) -#define S5PC1XX_MPLL_CON S5PC1XX_CLKREG(0x104) -#define S5PC1XX_EPLL_CON S5PC1XX_CLKREG(0x108) -#define S5PC100_HPLL_CON S5PC1XX_CLKREG(0x10C) - -#define S5PC1XX_CLK_SRC0 S5PC1XX_CLKREG(0x200) -#define S5PC1XX_CLK_SRC1 S5PC1XX_CLKREG(0x204) -#define S5PC1XX_CLK_SRC2 S5PC1XX_CLKREG(0x208) -#define S5PC1XX_CLK_SRC3 S5PC1XX_CLKREG(0x20C) - -#define S5PC1XX_CLK_DIV0 S5PC1XX_CLKREG(0x300) -#define S5PC1XX_CLK_DIV1 S5PC1XX_CLKREG(0x304) -#define S5PC1XX_CLK_DIV2 S5PC1XX_CLKREG(0x308) -#define S5PC1XX_CLK_DIV3 S5PC1XX_CLKREG(0x30C) -#define S5PC1XX_CLK_DIV4 S5PC1XX_CLKREG(0x310) - -#define S5PC100_CLK_OUT S5PC1XX_CLKREG(0x400) - -#define S5PC100_CLKGATE_D00 S5PC1XX_CLKREG(0x500) -#define S5PC100_CLKGATE_D01 S5PC1XX_CLKREG(0x504) -#define S5PC100_CLKGATE_D02 S5PC1XX_CLKREG(0x508) - -#define S5PC100_CLKGATE_D10 S5PC1XX_CLKREG(0x520) -#define S5PC100_CLKGATE_D11 S5PC1XX_CLKREG(0x524) -#define S5PC100_CLKGATE_D12 S5PC1XX_CLKREG(0x528) -#define S5PC100_CLKGATE_D13 S5PC1XX_CLKREG(0x52C) -#define S5PC100_CLKGATE_D14 S5PC1XX_CLKREG(0x530) -#define S5PC100_CLKGATE_D15 S5PC1XX_CLKREG(0x534) - -#define S5PC100_CLKGATE_D20 S5PC1XX_CLKREG(0x540) - -#define S5PC100_SCLKGATE0 S5PC1XX_CLKREG(0x560) -#define S5PC100_SCLKGATE1 S5PC1XX_CLKREG(0x564) - -#define S5PC100_OTHERS S5PC1XX_CLKREG(0x8200) - -#define S5PC1XX_EPLL_EN (1<<31) -#define S5PC1XX_EPLL_MASK 0xffffffff -#define S5PC1XX_EPLLVAL (_m, _p, _s) ((_m) << 16 | ((_p) << 8) | ((_s))) +#define S5PC100_CLKREG (x) (S5PC1XX_VA_CLK + (x)) +#define S5PC100_CLKREG_OTHER (x) (S5PC1XX_VA_CLK_OTHER + (x)) + +/* s5pc100 register for clock */ +#define S5PC100_APLL_LOCK S5PC100_CLKREG(0x00) +#define S5PC100_MPLL_LOCK S5PC100_CLKREG(0x04) +#define S5PC100_EPLL_LOCK S5PC100_CLKREG(0x08) +#define S5PC100_HPLL_LOCK S5PC100_CLKREG(0x0C) + +#define S5PC100_APLL_CON S5PC100_CLKREG(0x100) +#define S5PC100_MPLL_CON S5PC100_CLKREG(0x104) +#define S5PC100_EPLL_CON S5PC100_CLKREG(0x108) +#define S5PC100_HPLL_CON S5PC100_CLKREG(0x10C) + +#define S5PC100_CLKSRC0 S5PC100_CLKREG(0x200) +#define S5PC100_CLKSRC1 S5PC100_CLKREG(0x204) +#define S5PC100_CLKSRC2 S5PC100_CLKREG(0x208) +#define S5PC100_CLKSRC3 S5PC100_CLKREG(0x20C) + +#define S5PC100_CLKDIV0 S5PC100_CLKREG(0x300) +#define S5PC100_CLKDIV1 S5PC100_CLKREG(0x304) +#define S5PC100_CLKDIV2 S5PC100_CLKREG(0x308) +#define S5PC100_CLKDIV3 S5PC100_CLKREG(0x30C) +#define S5PC100_CLKDIV4 S5PC100_CLKREG(0x310) + +#define S5PC100_CLK_OUT S5PC100_CLKREG(0x400) + +#define S5PC100_CLKGATE_D00 S5PC100_CLKREG(0x500) +#define S5PC100_CLKGATE_D01 S5PC100_CLKREG(0x504) +#define S5PC100_CLKGATE_D02 S5PC100_CLKREG(0x508) + +#define S5PC100_CLKGATE_D10 S5PC100_CLKREG(0x520) +#define S5PC100_CLKGATE_D11 S5PC100_CLKREG(0x524) +#define S5PC100_CLKGATE_D12 S5PC100_CLKREG(0x528) +#define S5PC100_CLKGATE_D13 S5PC100_CLKREG(0x52C) +#define S5PC100_CLKGATE_D14 S5PC100_CLKREG(0x530) +#define S5PC100_CLKGATE_D15 S5PC100_CLKREG(0x534) + +#define S5PC100_CLKGATE_D20 S5PC100_CLKREG(0x540) + +#define S5PC100_SCLKGATE0 S5PC100_CLKREG(0x560) +#define S5PC100_SCLKGATE1 S5PC100_CLKREG(0x564) + +/* EPLL_CON */ +#define S5PC100_EPLL_EN (1<<31) +#define S5PC100_EPLL_MASK 0xffffffff +#define S5PC100_EPLLVAL (_m, _p, _s) ((_m) << 16 | ((_p) << 8) | ((_s)))/* CLKSRC0 */ -#define S5PC1XX_CLKSRC0_APLL_MASK (0x1<<0) -#define S5PC1XX_CLKSRC0_APLL_SHIFT (0) -#define S5PC1XX_CLKSRC0_MPLL_MASK (0x1<<4) -#define S5PC1XX_CLKSRC0_MPLL_SHIFT (4) -#define S5PC1XX_CLKSRC0_EPLL_MASK (0x1<<8) -#define S5PC1XX_CLKSRC0_EPLL_SHIFT (8) +#define S5PC100_CLKSRC0_APLL_MASK (0x1<<0) +#define S5PC100_CLKSRC0_APLL_SHIFT (0) +#define S5PC100_CLKSRC0_MPLL_MASK (0x1<<4) +#define S5PC100_CLKSRC0_MPLL_SHIFT (4) +#define S5PC100_CLKSRC0_EPLL_MASK (0x1<<8) +#define S5PC100_CLKSRC0_EPLL_SHIFT (8)#define S5PC100_CLKSRC0_HPLL_MASK (0x1<<12)#define S5PC100_CLKSRC0_HPLL_SHIFT (12)#define S5PC100_CLKSRC0_AMMUX_MASK (0x1<<16)#define S5PC100_CLKSRC0_AMMUX_SHIFT (16)#define S5PC100_CLKSRC0_HREF_MASK (0x1<<20)#define S5PC100_CLKSRC0_HREF_SHIFT (20) -#define S5PC1XX_CLKSRC0_ONENAND_MASK (0x1<<24) -#define S5PC1XX_CLKSRC0_ONENAND_SHIFT (24) +#define S5PC100_CLKSRC0_ONENAND_MASK (0x1<<24) +#define S5PC100_CLKSRC0_ONENAND_SHIFT (24)/* CLKSRC1 */
@@ -127,10 +128,9 @@#define S5PC100_CLKSRC3_SPDIF_MASK (0x3<<24)#define S5PC100_CLKSRC3_SPDIF_SHIFT (24) -/* CLKDIV0 */ -#define S5PC1XX_CLKDIV0_APLL_MASK (0x1<<0) -#define S5PC1XX_CLKDIV0_APLL_SHIFT (0) +#define S5PC100_CLKDIV0_APLL_MASK (0x1<<0) +#define S5PC100_CLKDIV0_APLL_SHIFT (0)#define S5PC100_CLKDIV0_ARM_MASK (0x7<<4)#define S5PC100_CLKDIV0_ARM_SHIFT (4)#define S5PC100_CLKDIV0_D0_MASK (0x7<<8)
@@ -141,8 +141,8 @@#define S5PC100_CLKDIV0_SECSS_SHIFT (16)/* CLKDIV1 */ -#define S5PC100_CLKDIV1_AM_MASK (0x7<<0) -#define S5PC100_CLKDIV1_AM_SHIFT (0) +#define S5PC100_CLKDIV1_APLL2_MASK (0x7<<0) +#define S5PC100_CLKDIV1_APLL2_SHIFT (0)#define S5PC100_CLKDIV1_MPLL_MASK (0x3<<4)#define S5PC100_CLKDIV1_MPLL_SHIFT (4)#define S5PC100_CLKDIV1_MPLL2_MASK (0x1<<8)
@@ -202,7 +202,6 @@#define S5PC100_CLKDIV4_AUDIO2_MASK (0xf<<20)#define S5PC100_CLKDIV4_AUDIO2_SHIFT (20) -/* HCLKD0/PCLKD0 Clock Gate 0 Registers */ #define S5PC100_CLKGATE_D00_INTC (1<<0)#define S5PC100_CLKGATE_D00_TZIC (1<<1)
@@ -295,8 +294,8 @@#define S5PC100_CLKGATE_D20_I2SD2 (1<<1)/* Special Clock Gate 0 Registers */ -#define S5PC1XX_CLKGATE_SCLK0_HPM (1<<0) -#define S5PC1XX_CLKGATE_SCLK0_PWI (1<<1) +#define S5PC100_CLKGATE_SCLK0_HPM (1<<0) +#define S5PC100_CLKGATE_SCLK0_PWI (1<<1)#define S5PC100_CLKGATE_SCLK0_ONENAND (1<<2)#define S5PC100_CLKGATE_SCLK0_UART (1<<3)#define S5PC100_CLKGATE_SCLK0_SPI0 (1<<4)
@@ -329,89 +328,28 @@#define S5PC100_CLKGATE_SCLK1_SPDIF (1<<11)#define S5PC100_CLKGATE_SCLK1_CAM (1<<12) -/* register for power management */ -#define S5PC100_PWR_CFG S5PC1XX_CLKREG(0x8000) -#define S5PC100_EINT_WAKEUP_MASK S5PC1XX_CLKREG(0x8004) -#define S5PC100_NORMAL_CFG S5PC1XX_CLKREG(0x8010) -#define S5PC100_STOP_CFG S5PC1XX_CLKREG(0x8014) -#define S5PC100_SLEEP_CFG S5PC1XX_CLKREG(0x8018) -#define S5PC100_STOP_MEM_CFG S5PC1XX_CLKREG(0x801C) -#define S5PC100_OSC_FREQ S5PC1XX_CLKREG(0x8100) -#define S5PC100_OSC_STABLE S5PC1XX_CLKREG(0x8104) -#define S5PC100_PWR_STABLE S5PC1XX_CLKREG(0x8108) -#define S5PC100_MTC_STABLE S5PC1XX_CLKREG(0x8110) -#define S5PC100_CLAMP_STABLE S5PC1XX_CLKREG(0x8114) -#define S5PC100_OTHERS S5PC1XX_CLKREG(0x8200) -#define S5PC100_RST_STAT S5PC1XX_CLKREG(0x8300) -#define S5PC100_WAKEUP_STAT S5PC1XX_CLKREG(0x8304) -#define S5PC100_BLK_PWR_STAT S5PC1XX_CLKREG(0x8308) -#define S5PC100_INFORM0 S5PC1XX_CLKREG(0x8400) -#define S5PC100_INFORM1 S5PC1XX_CLKREG(0x8404) -#define S5PC100_INFORM2 S5PC1XX_CLKREG(0x8408) -#define S5PC100_INFORM3 S5PC1XX_CLKREG(0x840C) -#define S5PC100_INFORM4 S5PC1XX_CLKREG(0x8410) -#define S5PC100_INFORM5 S5PC1XX_CLKREG(0x8414) -#define S5PC100_INFORM6 S5PC1XX_CLKREG(0x8418) -#define S5PC100_INFORM7 S5PC1XX_CLKREG(0x841C) -#define S5PC100_DCGIDX_MAP0 S5PC1XX_CLKREG(0x8500) -#define S5PC100_DCGIDX_MAP1 S5PC1XX_CLKREG(0x8504) -#define S5PC100_DCGIDX_MAP2 S5PC1XX_CLKREG(0x8508) -#define S5PC100_DCGPERF_MAP0 S5PC1XX_CLKREG(0x850C) -#define S5PC100_DCGPERF_MAP1 S5PC1XX_CLKREG(0x8510) -#define S5PC100_DVCIDX_MAP S5PC1XX_CLKREG(0x8514) -#define S5PC100_FREQ_CPU S5PC1XX_CLKREG(0x8518) -#define S5PC100_FREQ_DPM S5PC1XX_CLKREG(0x851C) -#define S5PC100_DVSEMCLK_EN S5PC1XX_CLKREG(0x8520) -#define S5PC100_APLL_CON_L8 S5PC1XX_CLKREG(0x8600) -#define S5PC100_APLL_CON_L7 S5PC1XX_CLKREG(0x8604) -#define S5PC100_APLL_CON_L6 S5PC1XX_CLKREG(0x8608) -#define S5PC100_APLL_CON_L5 S5PC1XX_CLKREG(0x860C) -#define S5PC100_APLL_CON_L4 S5PC1XX_CLKREG(0x8610) -#define S5PC100_APLL_CON_L3 S5PC1XX_CLKREG(0x8614) -#define S5PC100_APLL_CON_L2 S5PC1XX_CLKREG(0x8618) -#define S5PC100_APLL_CON_L1 S5PC1XX_CLKREG(0x861C) -#define S5PC100_IEM_CONTROL S5PC1XX_CLKREG(0x8620) -#define S5PC100_CLKDIV_IEM_L8 S5PC1XX_CLKREG(0x8700) -#define S5PC100_CLKDIV_IEM_L7 S5PC1XX_CLKREG(0x8704) -#define S5PC100_CLKDIV_IEM_L6 S5PC1XX_CLKREG(0x8708) -#define S5PC100_CLKDIV_IEM_L5 S5PC1XX_CLKREG(0x870C) -#define S5PC100_CLKDIV_IEM_L4 S5PC1XX_CLKREG(0x8710) -#define S5PC100_CLKDIV_IEM_L3 S5PC1XX_CLKREG(0x8714) -#define S5PC100_CLKDIV_IEM_L2 S5PC1XX_CLKREG(0x8718) -#define S5PC100_CLKDIV_IEM_L1 S5PC1XX_CLKREG(0x871C) -#define S5PC100_IEM_HPMCLK_DIV S5PC1XX_CLKREG(0x8724) - -#define S5PC100_SWRESET S5PC1XX_CLKREG(0x100000) -#define S5PC100_OND_SWRESET S5PC1XX_CLKREG(0x100008) -#define S5PC100_GEN_CTRL S5PC1XX_CLKREG(0x100100) -#define S5PC100_GEN_STATUS S5PC1XX_CLKREG(0x100104) -#define S5PC100_MEM_SYS_CFG S5PC1XX_CLKREG(0x100200) -#define S5PC100_CAM_MUX_SEL S5PC1XX_CLKREG(0x100300) -#define S5PC100_MIXER_OUT_SEL S5PC1XX_CLKREG(0x100304) -#define S5PC100_LPMP_MODE_SEL S5PC1XX_CLKREG(0x100308) -#define S5PC100_MIPI_PHY_CON0 S5PC1XX_CLKREG(0x100400) -#define S5PC100_MIPI_PHY_CON1 S5PC1XX_CLKREG(0x100414) -#define S5PC100_HDMI_PHY_CON0 S5PC1XX_CLKREG(0x100420) - -#define S5PC100_CFG_WFI_CLEAN (~(3<<5)) -#define S5PC100_CFG_WFI_IDLE (1<<5) -#define S5PC100_CFG_WFI_STOP (2<<5) -#define S5PC100_CFG_WFI_SLEEP (3<<5) - +#define S5PC100_SWRESET S5PC100_CLKREG_OTHER(0x000) +#define S5PC100_OND_SWRESET S5PC100_CLKREG_OTHER(0x008) +#define S5PC100_GEN_CTRL S5PC100_CLKREG_OTHER(0x100) +#define S5PC100_GEN_STATUS S5PC100_CLKREG_OTHER(0x104) +#define S5PC100_MEM_SYS_CFG S5PC100_CLKREG_OTHER(0x200) +#define S5PC100_CAM_MUX_SEL S5PC100_CLKREG_OTHER(0x300) +#define S5PC100_MIXER_OUT_SEL S5PC100_CLKREG_OTHER(0x304) +#define S5PC100_LPMP_MODE_SEL S5PC100_CLKREG_OTHER(0x308) +#define S5PC100_MIPI_PHY_CON0 S5PC100_CLKREG_OTHER(0x400) +#define S5PC100_MIPI_PHY_CON1 S5PC100_CLKREG_OTHER(0x414) +#define S5PC100_HDMI_PHY_CON0 S5PC100_CLKREG_OTHER(0x420) + +#define S5PC100_SWRESET_RESETVAL 0xc100#define S5PC100_OTHER_SYS_INT 24#define S5PC100_OTHER_STA_TYPE 23#define STA_TYPE_EXPON 0#define STA_TYPE_SFR 1 -#define S5PC100_PWR_STA_EXP_SCALE 0 -#define S5PC100_PWR_STA_CNT 4 - -#define S5PC100_PWR_STABLE_COUNT 85500 -#define S5PC100_SLEEP_CFG_OSC_EN 0/* OTHERS Resgister */ -#define S5PC100_OTHERS_USB_SIG_MASK (1 << 16) +#define S5PC100_OTHERS_USB_SIG_MASK (1 << 16)#define S5PC100_OTHERS_MIPI_DPHY_EN (1 << 28)/* MIPI D-PHY Control Register 0 */
arch/arm/plat-s5pc1xx/s5pc100-clock.c +22 -22
117 lines not on this page · raw message
Signature · 1 line
1.6.4
PATCH 3/14 ARM: S5PC1XX: clocks reimplementation
From: Kyungmin Park <[email protected]>
Clocks hierarchy has been completely reimplemented to match the S5PC100 specification.
--- arch/arm/plat-s5pc1xx/Makefile | 1 + arch/arm/plat-s5pc1xx/clock.c | 728 ++++++++++++ arch/arm/plat-s5pc1xx/cpu.c | 5 + arch/arm/plat-s5pc1xx/include/plat/s5pc100.h | 5 +- arch/arm/plat-s5pc1xx/s5pc100-clock.c | 1531 +++++++++++++------------- 5 files changed, 1504 insertions(+), 766 deletions(-) create mode 100644 arch/arm/plat-s5pc1xx/clock.c
arch/arm/plat-s5pc1xx/Makefile +1 -0
@@ -14,6 +14,7 @@ obj- := obj-y += dev-uart.o obj-y += cpu.o obj-y += irq.o +obj-y += clock.o # CPU support
arch/arm/plat-s5pc1xx/clock.c new file +728 -0
728 lines not on this page · raw message
arch/arm/plat-s5pc1xx/cpu.c +5 -0
@@ -55,6 +55,11 @@ static struct cpu_table cpu_ids[] __initdata = {static struct map_desc s5pc1xx_iodesc[]__initdata = { { + .virtual = (unsigned long )S5PC1XX_VA_CLK_OTHER , + .pfn =__phys_to_pfn (S5PC1XX_PA_CLK_OTHER ), + .length =SZ_4K , + .type =MT_DEVICE , + }, { .virtual = (unsigned long )S5PC1XX_VA_CHIPID , .pfn =__phys_to_pfn (S5PC1XX_PA_CHIPID ), .length =SZ_16 ,
arch/arm/plat-s5pc1xx/include/plat/s5pc100.h +2 -3
@@ -35,10 +35,9 @@ extern struct clk clk_hpll;extern struct clk clk_hd0;extern struct clk clk_pd0;extern struct clk clk_54m; -extern struct clk clk_dout_mpll2;extern void s5pc1xx_register_clocks (void ); -extern int s5pc1xx_sclk0_ctrl (struct clk *clk,int enable); -extern int s5pc1xx_sclk1_ctrl (struct clk *clk,int enable); +extern int s5pc100_sclk0_ctrl (struct clk *clk,int enable); +extern int s5pc100_sclk1_ctrl (struct clk *clk,int enable);/* Some day, belows will be moved to plat-s5pc/include/plat/devs.h */ extern struct s3c24xx_uart_resources s5pc1xx_uart_resources[];
arch/arm/plat-s5pc1xx/s5pc100-clock.c +768 -763
1,740 lines not on this page · raw message
Signature · 1 line
1.6.4
PATCH 4/14 ARM: S5PC1XX: add GPIO L banks to register definition
From: Kyungmin Park <[email protected]>
Add GPIO L0-L4 banks to register definition.
--- arch/arm/mach-s5pc100/include/mach/gpio.h | 30 ++++++++++++++++++++++------ 1 files changed, 23 insertions(+), 7 deletions(-)
arch/arm/mach-s5pc100/include/mach/gpio.h +23 -7
@@ -47,6 +47,11 @@#define S5PC1XX_GPIO_K1_NR (6)#define S5PC1XX_GPIO_K2_NR (8)#define S5PC1XX_GPIO_K3_NR (8) +#define S5PC1XX_GPIO_L0_NR (8) +#define S5PC1XX_GPIO_L1_NR (8) +#define S5PC1XX_GPIO_L2_NR (8) +#define S5PC1XX_GPIO_L3_NR (8) +#define S5PC1XX_GPIO_L4_NR (8)#define S5PC1XX_GPIO_MP00_NR (8)#define S5PC1XX_GPIO_MP01_NR (8)#define S5PC1XX_GPIO_MP02_NR (8)
@@ -64,9 +69,9 @@ ((__gpio##_START) + (__gpio##_NR) + CONFIG_S3C_GPIO_SPACE + 1)enum s3c_gpio_number { -S5PC1XX_GPIO_A0_START =0 , -S5PC1XX_GPIO_A1_START =S5PC1XX_GPIO_NEXT (S5PC1XX_GPIO_A0 ), -S5PC1XX_GPIO_B_START =S5PC1XX_GPIO_NEXT (S5PC1XX_GPIO_A1 ), +S5PC1XX_GPIO_A0_START =0 , +S5PC1XX_GPIO_A1_START =S5PC1XX_GPIO_NEXT (S5PC1XX_GPIO_A0 ), +S5PC1XX_GPIO_B_START =S5PC1XX_GPIO_NEXT (S5PC1XX_GPIO_A1 ),S5PC1XX_GPIO_C_START =S5PC1XX_GPIO_NEXT (S5PC1XX_GPIO_B ),S5PC1XX_GPIO_D_START =S5PC1XX_GPIO_NEXT (S5PC1XX_GPIO_C ),S5PC1XX_GPIO_E0_START =S5PC1XX_GPIO_NEXT (S5PC1XX_GPIO_D ),
@@ -93,11 +98,17 @@ enum s3c_gpio_number {S5PC1XX_GPIO_K1_START =S5PC1XX_GPIO_NEXT (S5PC1XX_GPIO_K0 ),S5PC1XX_GPIO_K2_START =S5PC1XX_GPIO_NEXT (S5PC1XX_GPIO_K1 ),S5PC1XX_GPIO_K3_START =S5PC1XX_GPIO_NEXT (S5PC1XX_GPIO_K2 ), -S5PC1XX_GPIO_MP00_START =S5PC1XX_GPIO_NEXT (S5PC1XX_GPIO_K3 ), +S5PC1XX_GPIO_L0_START =S5PC1XX_GPIO_NEXT (S5PC1XX_GPIO_K3 ), +S5PC1XX_GPIO_L1_START =S5PC1XX_GPIO_NEXT (S5PC1XX_GPIO_L0 ), +S5PC1XX_GPIO_L2_START =S5PC1XX_GPIO_NEXT (S5PC1XX_GPIO_L1 ), +S5PC1XX_GPIO_L3_START =S5PC1XX_GPIO_NEXT (S5PC1XX_GPIO_L2 ), +S5PC1XX_GPIO_L4_START =S5PC1XX_GPIO_NEXT (S5PC1XX_GPIO_L3 ), +S5PC1XX_GPIO_MP00_START =S5PC1XX_GPIO_NEXT (S5PC1XX_GPIO_L4 ),S5PC1XX_GPIO_MP01_START =S5PC1XX_GPIO_NEXT (S5PC1XX_GPIO_MP00 ),S5PC1XX_GPIO_MP02_START =S5PC1XX_GPIO_NEXT (S5PC1XX_GPIO_MP01 ),S5PC1XX_GPIO_MP03_START =S5PC1XX_GPIO_NEXT (S5PC1XX_GPIO_MP02 ),S5PC1XX_GPIO_MP04_START =S5PC1XX_GPIO_NEXT (S5PC1XX_GPIO_MP03 ), + S5PC1XX_GPIO_END = S5PC1XX_GPIO_NEXT(S5PC1XX_GPIO_MP04), };/* S5PC1XX GPIO number definitions. */
@@ -130,17 +141,22 @@ enum s3c_gpio_number {#define S5PC1XX_GPK1 (_nr) (S5PC1XX_GPIO_K1_START + (_nr))#define S5PC1XX_GPK2 (_nr) (S5PC1XX_GPIO_K2_START + (_nr))#define S5PC1XX_GPK3 (_nr) (S5PC1XX_GPIO_K3_START + (_nr)) +#define S5PC1XX_GPL0 (_nr) (S5PC1XX_GPIO_L0_START + (_nr)) +#define S5PC1XX_GPL1 (_nr) (S5PC1XX_GPIO_L1_START + (_nr)) +#define S5PC1XX_GPL2 (_nr) (S5PC1XX_GPIO_L2_START + (_nr)) +#define S5PC1XX_GPL3 (_nr) (S5PC1XX_GPIO_L3_START + (_nr)) +#define S5PC1XX_GPL4 (_nr) (S5PC1XX_GPIO_L4_START + (_nr))#define S5PC1XX_MP00 (_nr) (S5PC1XX_GPIO_MP00_START + (_nr))#define S5PC1XX_MP01 (_nr) (S5PC1XX_GPIO_MP01_START + (_nr))#define S5PC1XX_MP02 (_nr) (S5PC1XX_GPIO_MP02_START + (_nr))#define S5PC1XX_MP03 (_nr) (S5PC1XX_GPIO_MP03_START + (_nr))#define S5PC1XX_MP04 (_nr) (S5PC1XX_GPIO_MP04_START + (_nr)) +#define S5PC1XX_MP05 (_nr) (S5PC1XX_GPIO_MP05_START + (_nr)) -/* the end of the S5PC1XX specific gpios */ -#define S5PC1XX_GPIO_END (S5PC1XX_MP04(S5PC1XX_GPIO_MP04_NR) + 1) +/* It used the end of the S5PC1XX gpios */ #define S3C_GPIO_END S5PC1XX_GPIO_END/* define the number of gpios we need to the one after the MP04() range */ -#define ARCH_NR_GPIOS (S5PC1XX_MP04(S5PC1XX_GPIO_MP04_NR) + 1) +#define ARCH_NR_GPIOS (S5PC1XX_GPIO_END + 1)#include <asm-generic/gpio.h>
Signature · 1 line
1.6.4
PATCH 5/14 ARM: S5PC1XX: GPIO registers rename
From: Kyungmin Park <[email protected]>
S5PC100 and S5PC110 GPIO registers differs in many places, rename all previously defined registers to be S5PC100 specific.
--- arch/arm/mach-s5pc100/include/mach/gpio.h | 244 ++++++++++++++-------------- 1 files changed, 122 insertions(+), 122 deletions(-)
arch/arm/mach-s5pc100/include/mach/gpio.h +122 -122
@@ -18,45 +18,45 @@#define gpio_to_irq __gpio_to_irq/* GPIO bank sizes */ -#define S5PC1XX_GPIO_A0_NR (8) -#define S5PC1XX_GPIO_A1_NR (5) -#define S5PC1XX_GPIO_B_NR (8) -#define S5PC1XX_GPIO_C_NR (5) -#define S5PC1XX_GPIO_D_NR (7) -#define S5PC1XX_GPIO_E0_NR (8) -#define S5PC1XX_GPIO_E1_NR (6) -#define S5PC1XX_GPIO_F0_NR (8) -#define S5PC1XX_GPIO_F1_NR (8) -#define S5PC1XX_GPIO_F2_NR (8) -#define S5PC1XX_GPIO_F3_NR (4) -#define S5PC1XX_GPIO_G0_NR (8) -#define S5PC1XX_GPIO_G1_NR (3) -#define S5PC1XX_GPIO_G2_NR (7) -#define S5PC1XX_GPIO_G3_NR (7) -#define S5PC1XX_GPIO_H0_NR (8) -#define S5PC1XX_GPIO_H1_NR (8) -#define S5PC1XX_GPIO_H2_NR (8) -#define S5PC1XX_GPIO_H3_NR (8) -#define S5PC1XX_GPIO_I_NR (8) -#define S5PC1XX_GPIO_J0_NR (8) -#define S5PC1XX_GPIO_J1_NR (5) -#define S5PC1XX_GPIO_J2_NR (8) -#define S5PC1XX_GPIO_J3_NR (8) -#define S5PC1XX_GPIO_J4_NR (4) -#define S5PC1XX_GPIO_K0_NR (8) -#define S5PC1XX_GPIO_K1_NR (6) -#define S5PC1XX_GPIO_K2_NR (8) -#define S5PC1XX_GPIO_K3_NR (8) -#define S5PC1XX_GPIO_L0_NR (8) -#define S5PC1XX_GPIO_L1_NR (8) -#define S5PC1XX_GPIO_L2_NR (8) -#define S5PC1XX_GPIO_L3_NR (8) -#define S5PC1XX_GPIO_L4_NR (8) -#define S5PC1XX_GPIO_MP00_NR (8) -#define S5PC1XX_GPIO_MP01_NR (8) -#define S5PC1XX_GPIO_MP02_NR (8) -#define S5PC1XX_GPIO_MP03_NR (8) -#define S5PC1XX_GPIO_MP04_NR (5) +#define S5PC100_GPIO_A0_NR (8) +#define S5PC100_GPIO_A1_NR (5) +#define S5PC100_GPIO_B_NR (8) +#define S5PC100_GPIO_C_NR (5) +#define S5PC100_GPIO_D_NR (7) +#define S5PC100_GPIO_E0_NR (8) +#define S5PC100_GPIO_E1_NR (6) +#define S5PC100_GPIO_F0_NR (8) +#define S5PC100_GPIO_F1_NR (8) +#define S5PC100_GPIO_F2_NR (8) +#define S5PC100_GPIO_F3_NR (4) +#define S5PC100_GPIO_G0_NR (8) +#define S5PC100_GPIO_G1_NR (3) +#define S5PC100_GPIO_G2_NR (7) +#define S5PC100_GPIO_G3_NR (7) +#define S5PC100_GPIO_H0_NR (8) +#define S5PC100_GPIO_H1_NR (8) +#define S5PC100_GPIO_H2_NR (8) +#define S5PC100_GPIO_H3_NR (8) +#define S5PC100_GPIO_I_NR (8) +#define S5PC100_GPIO_J0_NR (8) +#define S5PC100_GPIO_J1_NR (5) +#define S5PC100_GPIO_J2_NR (8) +#define S5PC100_GPIO_J3_NR (8) +#define S5PC100_GPIO_J4_NR (4) +#define S5PC100_GPIO_K0_NR (8) +#define S5PC100_GPIO_K1_NR (6) +#define S5PC100_GPIO_K2_NR (8) +#define S5PC100_GPIO_K3_NR (8) +#define S5PC100_GPIO_L0_NR (8) +#define S5PC100_GPIO_L1_NR (8) +#define S5PC100_GPIO_L2_NR (8) +#define S5PC100_GPIO_L3_NR (8) +#define S5PC100_GPIO_L4_NR (8) +#define S5PC100_GPIO_MP00_NR (8) +#define S5PC100_GPIO_MP01_NR (8) +#define S5PC100_GPIO_MP02_NR (8) +#define S5PC100_GPIO_MP03_NR (8) +#define S5PC100_GPIO_MP04_NR (5)/* GPIO bank numbes */
@@ -69,94 +69,94 @@ ((__gpio##_START) + (__gpio##_NR) + CONFIG_S3C_GPIO_SPACE + 1)enum s3c_gpio_number { -S5PC1XX_GPIO_A0_START =0 , -S5PC1XX_GPIO_A1_START =S5PC1XX_GPIO_NEXT (S5PC1XX_GPIO_A0 ), -S5PC1XX_GPIO_B_START =S5PC1XX_GPIO_NEXT (S5PC1XX_GPIO_A1 ), -S5PC1XX_GPIO_C_START =S5PC1XX_GPIO_NEXT (S5PC1XX_GPIO_B ), -S5PC1XX_GPIO_D_START =S5PC1XX_GPIO_NEXT (S5PC1XX_GPIO_C ), -S5PC1XX_GPIO_E0_START =S5PC1XX_GPIO_NEXT (S5PC1XX_GPIO_D ), -S5PC1XX_GPIO_E1_START =S5PC1XX_GPIO_NEXT (S5PC1XX_GPIO_E0 ), -S5PC1XX_GPIO_F0_START =S5PC1XX_GPIO_NEXT (S5PC1XX_GPIO_E1 ), -S5PC1XX_GPIO_F1_START =S5PC1XX_GPIO_NEXT (S5PC1XX_GPIO_F0 ), -S5PC1XX_GPIO_F2_START =S5PC1XX_GPIO_NEXT (S5PC1XX_GPIO_F1 ), -S5PC1XX_GPIO_F3_START =S5PC1XX_GPIO_NEXT (S5PC1XX_GPIO_F2 ), -S5PC1XX_GPIO_G0_START =S5PC1XX_GPIO_NEXT (S5PC1XX_GPIO_F3 ), -S5PC1XX_GPIO_G1_START =S5PC1XX_GPIO_NEXT (S5PC1XX_GPIO_G0 ), -S5PC1XX_GPIO_G2_START =S5PC1XX_GPIO_NEXT (S5PC1XX_GPIO_G1 ), -S5PC1XX_GPIO_G3_START =S5PC1XX_GPIO_NEXT (S5PC1XX_GPIO_G2 ), -S5PC1XX_GPIO_H0_START =S5PC1XX_GPIO_NEXT (S5PC1XX_GPIO_G3 ), -S5PC1XX_GPIO_H1_START =S5PC1XX_GPIO_NEXT (S5PC1XX_GPIO_H0 ), -S5PC1XX_GPIO_H2_START =S5PC1XX_GPIO_NEXT (S5PC1XX_GPIO_H1 ), -S5PC1XX_GPIO_H3_START =S5PC1XX_GPIO_NEXT (S5PC1XX_GPIO_H2 ), -S5PC1XX_GPIO_I_START =S5PC1XX_GPIO_NEXT (S5PC1XX_GPIO_H3 ), -S5PC1XX_GPIO_J0_START =S5PC1XX_GPIO_NEXT (S5PC1XX_GPIO_I ), -S5PC1XX_GPIO_J1_START =S5PC1XX_GPIO_NEXT (S5PC1XX_GPIO_J0 ), -S5PC1XX_GPIO_J2_START =S5PC1XX_GPIO_NEXT (S5PC1XX_GPIO_J1 ), -S5PC1XX_GPIO_J3_START =S5PC1XX_GPIO_NEXT (S5PC1XX_GPIO_J2 ), -S5PC1XX_GPIO_J4_START =S5PC1XX_GPIO_NEXT (S5PC1XX_GPIO_J3 ), -S5PC1XX_GPIO_K0_START =S5PC1XX_GPIO_NEXT (S5PC1XX_GPIO_J4 ), -S5PC1XX_GPIO_K1_START =S5PC1XX_GPIO_NEXT (S5PC1XX_GPIO_K0 ), -S5PC1XX_GPIO_K2_START =S5PC1XX_GPIO_NEXT (S5PC1XX_GPIO_K1 ), -S5PC1XX_GPIO_K3_START =S5PC1XX_GPIO_NEXT (S5PC1XX_GPIO_K2 ), -S5PC1XX_GPIO_L0_START =S5PC1XX_GPIO_NEXT (S5PC1XX_GPIO_K3 ), -S5PC1XX_GPIO_L1_START =S5PC1XX_GPIO_NEXT (S5PC1XX_GPIO_L0 ), -S5PC1XX_GPIO_L2_START =S5PC1XX_GPIO_NEXT (S5PC1XX_GPIO_L1 ), -S5PC1XX_GPIO_L3_START =S5PC1XX_GPIO_NEXT (S5PC1XX_GPIO_L2 ), -S5PC1XX_GPIO_L4_START =S5PC1XX_GPIO_NEXT (S5PC1XX_GPIO_L3 ), -S5PC1XX_GPIO_MP00_START =S5PC1XX_GPIO_NEXT (S5PC1XX_GPIO_L4 ), -S5PC1XX_GPIO_MP01_START =S5PC1XX_GPIO_NEXT (S5PC1XX_GPIO_MP00 ), -S5PC1XX_GPIO_MP02_START =S5PC1XX_GPIO_NEXT (S5PC1XX_GPIO_MP01 ), -S5PC1XX_GPIO_MP03_START =S5PC1XX_GPIO_NEXT (S5PC1XX_GPIO_MP02 ), -S5PC1XX_GPIO_MP04_START =S5PC1XX_GPIO_NEXT (S5PC1XX_GPIO_MP03 ), -S5PC1XX_GPIO_END =S5PC1XX_GPIO_NEXT (S5PC1XX_GPIO_MP04 ), +S5PC100_GPIO_A0_START =0 , +S5PC100_GPIO_A1_START =S5PC1XX_GPIO_NEXT (S5PC100_GPIO_A0 ), +S5PC100_GPIO_B_START =S5PC1XX_GPIO_NEXT (S5PC100_GPIO_A1 ), +S5PC100_GPIO_C_START =S5PC1XX_GPIO_NEXT (S5PC100_GPIO_B ), +S5PC100_GPIO_D_START =S5PC1XX_GPIO_NEXT (S5PC100_GPIO_C ), +S5PC100_GPIO_E0_START =S5PC1XX_GPIO_NEXT (S5PC100_GPIO_D ), +S5PC100_GPIO_E1_START =S5PC1XX_GPIO_NEXT (S5PC100_GPIO_E0 ), +S5PC100_GPIO_F0_START =S5PC1XX_GPIO_NEXT (S5PC100_GPIO_E1 ), +S5PC100_GPIO_F1_START =S5PC1XX_GPIO_NEXT (S5PC100_GPIO_F0 ), +S5PC100_GPIO_F2_START =S5PC1XX_GPIO_NEXT (S5PC100_GPIO_F1 ), +S5PC100_GPIO_F3_START =S5PC1XX_GPIO_NEXT (S5PC100_GPIO_F2 ), +S5PC100_GPIO_G0_START =S5PC1XX_GPIO_NEXT (S5PC100_GPIO_F3 ), +S5PC100_GPIO_G1_START =S5PC1XX_GPIO_NEXT (S5PC100_GPIO_G0 ), +S5PC100_GPIO_G2_START =S5PC1XX_GPIO_NEXT (S5PC100_GPIO_G1 ), +S5PC100_GPIO_G3_START =S5PC1XX_GPIO_NEXT (S5PC100_GPIO_G2 ), +S5PC100_GPIO_H0_START =S5PC1XX_GPIO_NEXT (S5PC100_GPIO_G3 ), +S5PC100_GPIO_H1_START =S5PC1XX_GPIO_NEXT (S5PC100_GPIO_H0 ), +S5PC100_GPIO_H2_START =S5PC1XX_GPIO_NEXT (S5PC100_GPIO_H1 ), +S5PC100_GPIO_H3_START =S5PC1XX_GPIO_NEXT (S5PC100_GPIO_H2 ), +S5PC100_GPIO_I_START =S5PC1XX_GPIO_NEXT (S5PC100_GPIO_H3 ), +S5PC100_GPIO_J0_START =S5PC1XX_GPIO_NEXT (S5PC100_GPIO_I ), +S5PC100_GPIO_J1_START =S5PC1XX_GPIO_NEXT (S5PC100_GPIO_J0 ), +S5PC100_GPIO_J2_START =S5PC1XX_GPIO_NEXT (S5PC100_GPIO_J1 ), +S5PC100_GPIO_J3_START =S5PC1XX_GPIO_NEXT (S5PC100_GPIO_J2 ), +S5PC100_GPIO_J4_START =S5PC1XX_GPIO_NEXT (S5PC100_GPIO_J3 ), +S5PC100_GPIO_K0_START =S5PC1XX_GPIO_NEXT (S5PC100_GPIO_J4 ), +S5PC100_GPIO_K1_START =S5PC1XX_GPIO_NEXT (S5PC100_GPIO_K0 ), +S5PC100_GPIO_K2_START =S5PC1XX_GPIO_NEXT (S5PC100_GPIO_K1 ), +S5PC100_GPIO_K3_START =S5PC1XX_GPIO_NEXT (S5PC100_GPIO_K2 ), +S5PC100_GPIO_L0_START =S5PC1XX_GPIO_NEXT (S5PC100_GPIO_K3 ), +S5PC100_GPIO_L1_START =S5PC1XX_GPIO_NEXT (S5PC100_GPIO_L0 ), +S5PC100_GPIO_L2_START =S5PC1XX_GPIO_NEXT (S5PC100_GPIO_L1 ), +S5PC100_GPIO_L3_START =S5PC1XX_GPIO_NEXT (S5PC100_GPIO_L2 ), +S5PC100_GPIO_L4_START =S5PC1XX_GPIO_NEXT (S5PC100_GPIO_L3 ), +S5PC100_GPIO_MP00_START =S5PC1XX_GPIO_NEXT (S5PC100_GPIO_L4 ), +S5PC100_GPIO_MP01_START =S5PC1XX_GPIO_NEXT (S5PC100_GPIO_MP00 ), +S5PC100_GPIO_MP02_START =S5PC1XX_GPIO_NEXT (S5PC100_GPIO_MP01 ), +S5PC100_GPIO_MP03_START =S5PC1XX_GPIO_NEXT (S5PC100_GPIO_MP02 ), +S5PC100_GPIO_MP04_START =S5PC1XX_GPIO_NEXT (S5PC100_GPIO_MP03 ), +S5PC100_GPIO_END =S5PC1XX_GPIO_NEXT (S5PC100_GPIO_MP04 ), }; -/* S5PC1XX GPIO number definitions. */ -#define S5PC1XX_GPA0 (_nr) (S5PC1XX_GPIO_A0_START + (_nr)) -#define S5PC1XX_GPA1 (_nr) (S5PC1XX_GPIO_A1_START + (_nr)) -#define S5PC1XX_GPB (_nr) (S5PC1XX_GPIO_B_START + (_nr)) -#define S5PC1XX_GPC (_nr) (S5PC1XX_GPIO_C_START + (_nr)) -#define S5PC1XX_GPD (_nr) (S5PC1XX_GPIO_D_START + (_nr)) -#define S5PC1XX_GPE0 (_nr) (S5PC1XX_GPIO_E0_START + (_nr)) -#define S5PC1XX_GPE1 (_nr) (S5PC1XX_GPIO_E1_START + (_nr)) -#define S5PC1XX_GPF0 (_nr) (S5PC1XX_GPIO_F0_START + (_nr)) -#define S5PC1XX_GPF1 (_nr) (S5PC1XX_GPIO_F1_START + (_nr)) -#define S5PC1XX_GPF2 (_nr) (S5PC1XX_GPIO_F2_START + (_nr)) -#define S5PC1XX_GPF3 (_nr) (S5PC1XX_GPIO_F3_START + (_nr)) -#define S5PC1XX_GPG0 (_nr) (S5PC1XX_GPIO_G0_START + (_nr)) -#define S5PC1XX_GPG1 (_nr) (S5PC1XX_GPIO_G1_START + (_nr)) -#define S5PC1XX_GPG2 (_nr) (S5PC1XX_GPIO_G2_START + (_nr)) -#define S5PC1XX_GPG3 (_nr) (S5PC1XX_GPIO_G3_START + (_nr)) -#define S5PC1XX_GPH0 (_nr) (S5PC1XX_GPIO_H0_START + (_nr)) -#define S5PC1XX_GPH1 (_nr) (S5PC1XX_GPIO_H1_START + (_nr)) -#define S5PC1XX_GPH2 (_nr) (S5PC1XX_GPIO_H2_START + (_nr)) -#define S5PC1XX_GPH3 (_nr) (S5PC1XX_GPIO_H3_START + (_nr)) -#define S5PC1XX_GPI (_nr) (S5PC1XX_GPIO_I_START + (_nr)) -#define S5PC1XX_GPJ0 (_nr) (S5PC1XX_GPIO_J0_START + (_nr)) -#define S5PC1XX_GPJ1 (_nr) (S5PC1XX_GPIO_J1_START + (_nr)) -#define S5PC1XX_GPJ2 (_nr) (S5PC1XX_GPIO_J2_START + (_nr)) -#define S5PC1XX_GPJ3 (_nr) (S5PC1XX_GPIO_J3_START + (_nr)) -#define S5PC1XX_GPJ4 (_nr) (S5PC1XX_GPIO_J4_START + (_nr)) -#define S5PC1XX_GPK0 (_nr) (S5PC1XX_GPIO_K0_START + (_nr)) -#define S5PC1XX_GPK1 (_nr) (S5PC1XX_GPIO_K1_START + (_nr)) -#define S5PC1XX_GPK2 (_nr) (S5PC1XX_GPIO_K2_START + (_nr)) -#define S5PC1XX_GPK3 (_nr) (S5PC1XX_GPIO_K3_START + (_nr)) -#define S5PC1XX_GPL0 (_nr) (S5PC1XX_GPIO_L0_START + (_nr)) -#define S5PC1XX_GPL1 (_nr) (S5PC1XX_GPIO_L1_START + (_nr)) -#define S5PC1XX_GPL2 (_nr) (S5PC1XX_GPIO_L2_START + (_nr)) -#define S5PC1XX_GPL3 (_nr) (S5PC1XX_GPIO_L3_START + (_nr)) -#define S5PC1XX_GPL4 (_nr) (S5PC1XX_GPIO_L4_START + (_nr)) -#define S5PC1XX_MP00 (_nr) (S5PC1XX_GPIO_MP00_START + (_nr)) -#define S5PC1XX_MP01 (_nr) (S5PC1XX_GPIO_MP01_START + (_nr)) -#define S5PC1XX_MP02 (_nr) (S5PC1XX_GPIO_MP02_START + (_nr)) -#define S5PC1XX_MP03 (_nr) (S5PC1XX_GPIO_MP03_START + (_nr)) -#define S5PC1XX_MP04 (_nr) (S5PC1XX_GPIO_MP04_START + (_nr)) -#define S5PC1XX_MP05 (_nr) (S5PC1XX_GPIO_MP05_START + (_nr)) +/* S5PC100 GPIO number definitions. */ +#define S5PC100_GPA0 (_nr) (S5PC100_GPIO_A0_START + (_nr)) +#define S5PC100_GPA1 (_nr) (S5PC100_GPIO_A1_START + (_nr)) +#define S5PC100_GPB (_nr) (S5PC100_GPIO_B_START + (_nr)) +#define S5PC100_GPC (_nr) (S5PC100_GPIO_C_START + (_nr)) +#define S5PC100_GPD (_nr) (S5PC100_GPIO_D_START + (_nr)) +#define S5PC100_GPE0 (_nr) (S5PC100_GPIO_E0_START + (_nr)) +#define S5PC100_GPE1 (_nr) (S5PC100_GPIO_E1_START + (_nr)) +#define S5PC100_GPF0 (_nr) (S5PC100_GPIO_F0_START + (_nr)) +#define S5PC100_GPF1 (_nr) (S5PC100_GPIO_F1_START + (_nr)) +#define S5PC100_GPF2 (_nr) (S5PC100_GPIO_F2_START + (_nr)) +#define S5PC100_GPF3 (_nr) (S5PC100_GPIO_F3_START + (_nr)) +#define S5PC100_GPG0 (_nr) (S5PC100_GPIO_G0_START + (_nr)) +#define S5PC100_GPG1 (_nr) (S5PC100_GPIO_G1_START + (_nr)) +#define S5PC100_GPG2 (_nr) (S5PC100_GPIO_G2_START + (_nr)) +#define S5PC100_GPG3 (_nr) (S5PC100_GPIO_G3_START + (_nr)) +#define S5PC100_GPH0 (_nr) (S5PC100_GPIO_H0_START + (_nr)) +#define S5PC100_GPH1 (_nr) (S5PC100_GPIO_H1_START + (_nr)) +#define S5PC100_GPH2 (_nr) (S5PC100_GPIO_H2_START + (_nr)) +#define S5PC100_GPH3 (_nr) (S5PC100_GPIO_H3_START + (_nr)) +#define S5PC100_GPI (_nr) (S5PC100_GPIO_I_START + (_nr)) +#define S5PC100_GPJ0 (_nr) (S5PC100_GPIO_J0_START + (_nr)) +#define S5PC100_GPJ1 (_nr) (S5PC100_GPIO_J1_START + (_nr)) +#define S5PC100_GPJ2 (_nr) (S5PC100_GPIO_J2_START + (_nr)) +#define S5PC100_GPJ3 (_nr) (S5PC100_GPIO_J3_START + (_nr)) +#define S5PC100_GPJ4 (_nr) (S5PC100_GPIO_J4_START + (_nr)) +#define S5PC100_GPK0 (_nr) (S5PC100_GPIO_K0_START + (_nr)) +#define S5PC100_GPK1 (_nr) (S5PC100_GPIO_K1_START + (_nr)) +#define S5PC100_GPK2 (_nr) (S5PC100_GPIO_K2_START + (_nr)) +#define S5PC100_GPK3 (_nr) (S5PC100_GPIO_K3_START + (_nr)) +#define S5PC100_GPL0 (_nr) (S5PC100_GPIO_L0_START + (_nr)) +#define S5PC100_GPL1 (_nr) (S5PC100_GPIO_L1_START + (_nr)) +#define S5PC100_GPL2 (_nr) (S5PC100_GPIO_L2_START + (_nr)) +#define S5PC100_GPL3 (_nr) (S5PC100_GPIO_L3_START + (_nr)) +#define S5PC100_GPL4 (_nr) (S5PC100_GPIO_L4_START + (_nr)) +#define S5PC100_MP00 (_nr) (S5PC100_GPIO_MP00_START + (_nr)) +#define S5PC100_MP01 (_nr) (S5PC100_GPIO_MP01_START + (_nr)) +#define S5PC100_MP02 (_nr) (S5PC100_GPIO_MP02_START + (_nr)) +#define S5PC100_MP03 (_nr) (S5PC100_GPIO_MP03_START + (_nr)) +#define S5PC100_MP04 (_nr) (S5PC100_GPIO_MP04_START + (_nr)) +#define S5PC100_MP05 (_nr) (S5PC100_GPIO_MP05_START + (_nr))/* It used the end of the S5PC1XX gpios */ -#define S3C_GPIO_END S5PC1XX_GPIO_END +#define S3C_GPIO_END S5PC100_GPIO_END/* define the number of gpios we need to the one after the MP04() range */ -#define ARCH_NR_GPIOS (S5PC1XX_GPIO_END + 1) +#define ARCH_NR_GPIOS (S5PC100_GPIO_END + 1)#include <asm-generic/gpio.h>
Signature · 1 line
1.6.4
PATCH 6/14 ARM: S5PC1xx: add gpiolib and external/gpio interrupt support
From: Kyungmin Park <[email protected]>
Add support for gpiolib calls. This is based on the gpiolib implementation from plat-s3c64xx tree.
Add support for external interrupts for GPIO H banks.
Add support for GPIO interrupts for all banks.
--- arch/arm/plat-s3c/Kconfig | 6 + arch/arm/plat-s5pc1xx/Kconfig | 3 + arch/arm/plat-s5pc1xx/Makefile | 4 +- arch/arm/plat-s5pc1xx/cpu.c | 5 + arch/arm/plat-s5pc1xx/gpio-config.c | 62 +++ arch/arm/plat-s5pc1xx/gpiolib.c | 503 ++++++++++++++++++++ .../plat-s5pc1xx/include/plat/gpio-cfg-s5pc1xx.h | 32 ++ arch/arm/plat-s5pc1xx/include/plat/gpio-ext.h | 44 ++ arch/arm/plat-s5pc1xx/include/plat/irqs.h | 15 +- arch/arm/plat-s5pc1xx/include/plat/regs-gpio.h | 70 +++ arch/arm/plat-s5pc1xx/irq-eint.c | 281 +++++++++++ arch/arm/plat-s5pc1xx/irq-gpio.c | 266 +++++++++++ arch/arm/plat-s5pc1xx/irq.c | 2 +- 13 files changed, 1288 insertions(+), 5 deletions(-) create mode 100644 arch/arm/plat-s5pc1xx/gpio-config.c create mode 100644 arch/arm/plat-s5pc1xx/gpiolib.c create mode 100644 arch/arm/plat-s5pc1xx/include/plat/gpio-cfg-s5pc1xx.h create mode 100644 arch/arm/plat-s5pc1xx/include/plat/gpio-ext.h create mode 100644 arch/arm/plat-s5pc1xx/include/plat/regs-gpio.h create mode 100644 arch/arm/plat-s5pc1xx/irq-eint.c create mode 100644 arch/arm/plat-s5pc1xx/irq-gpio.c
arch/arm/plat-s3c/Kconfig +6 -0
@@ -159,6 +159,12 @@ config S3C_GPIO_CFG_S3C64XX Internal configuration to enable S3C64XX style GPIO configuration functions. +config S5P_GPIO_CFG_S5PC1XX + bool + help + Internal configuration to enable S5PC1XX style GPIO configuration + functions. + # DMA config S3C_DMA
arch/arm/plat-s5pc1xx/Kconfig +3 -0
@@ -15,6 +15,9 @@ config PLAT_S5PC1XX select ARCH_REQUIRE_GPIOLIB select S3C_GPIO_TRACK select S3C_GPIO_PULL_UPDOWN + select S3C_GPIO_CFG_S3C24XX + select S3C_GPIO_CFG_S3C64XX + select S5P_GPIO_CFG_S5PC1XX help Base platform code for any Samsung S5PC1XX device
arch/arm/plat-s5pc1xx/Makefile +3 -1
@@ -13,8 +13,9 @@ obj- := obj-y += dev-uart.o obj-y += cpu.o -obj-y += irq.o +obj-y += irq.o irq-gpio.o irq-eint.o obj-y += clock.o +obj-y += gpiolib.o # CPU support
@@ -23,5 +24,6 @@ obj-$(CONFIG_CPU_S5PC100_CLOCK) += s5pc100-clock.o # Device setup +obj-$(CONFIG_S5P_GPIO_CFG_S5PC1XX) += gpio-config.o obj-$(CONFIG_S5PC100_SETUP_I2C0) += setup-i2c0.o obj-$(CONFIG_S5PC100_SETUP_I2C1) += setup-i2c1.o
arch/arm/plat-s5pc1xx/cpu.c +5 -0
@@ -60,6 +60,11 @@ static struct map_desc s5pc1xx_iodesc[] __initdata = { .length = SZ_4K, .type = MT_DEVICE, }, { + .virtual = (unsigned long)S5PC1XX_VA_GPIO, + .pfn = __phys_to_pfn(S5PC100_PA_GPIO), + .length = SZ_4K, + .type = MT_DEVICE, + }, { .virtual = (unsigned long)S5PC1XX_VA_CHIPID, .pfn = __phys_to_pfn(S5PC1XX_PA_CHIPID), .length = SZ_16,
arch/arm/plat-s5pc1xx/gpio-config.c new file +62 -0
62 lines not on this page · raw message
arch/arm/plat-s5pc1xx/gpiolib.c new file +503 -0
503 lines not on this page · raw message
arch/arm/plat-s5pc1xx/include/plat/gpio-cfg-s5pc1xx.h new file +32 -0
@@ -0,0 +1,32 @@ +/* linux/arch/arm/plat-s5pc1xx/include/plat/gpio-cfg.h +* +* Copyright 2009 Samsung Electronic +* +* S5PC1XX Platform - GPIO pin configuration +* +* 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. +*/ + +/* This file contains the necessary definitions to get the basic gpio +* pin configuration done such as setting a pin to input or output or +* changing the pull-{up,down} configurations. +*/ + +#ifndef __GPIO_CFG_S5PC1XX_H +#define __GPIO_CFG_S5PC1XX_H __FILE__ + +typedef unsigned int __bitwise__ s5p_gpio_drvstr_t; + +#define S5P_GPIO_DRVSTR_LV1 0x00 +#define S5P_GPIO_DRVSTR_LV2 0x01 +#define S5P_GPIO_DRVSTR_LV3 0x10 +#define S5P_GPIO_DRVSTR_LV4 0x11 + +extern s5p_gpio_drvstr_t s5p_gpio_get_drvstr (unsigned int pin,unsigned int off); + +extern int s5p_gpio_set_drvstr (unsigned int pin,unsigned int off, +s5p_gpio_drvstr_t drvstr); + +#endif /* __GPIO_CFG_S5PC1XX_H */
arch/arm/plat-s5pc1xx/include/plat/gpio-ext.h new file +44 -0
44 lines not on this page · raw message
arch/arm/plat-s5pc1xx/include/plat/irqs.h +12 -3
@@ -171,12 +171,21 @@#define IRQ_SDMIRQ S5PC1XX_IRQ_VIC2(30)#define IRQ_SDMFIQ S5PC1XX_IRQ_VIC2(31) +/* External interrupt */ #define S3C_IRQ_EINT_BASE (IRQ_SDMFIQ + 1) -#define S3C_EINT (x) ((x) + S3C_IRQ_EINT_BASE) -#define IRQ_EINT (x) S3C_EINT(x) +#define S3C_EINT (x) (S3C_IRQ_EINT_BASE + (x - 16)) +#define IRQ_EINT (x) (x < 16 ? IRQ_EINT0 + x : S3C_EINT(x)) +#define IRQ_EINT_BIT (x) (x < IRQ_EINT16_31 ? x - IRQ_EINT0 : x - S3C_EINT(0)) -#define NR_IRQS (IRQ_EINT(31)+1) +/* GPIO interrupt */ +#define S3C_IRQ_GPIO_BASE (IRQ_EINT(31) + 1) +#define S3C_IRQ_GPIO (x) (S3C_IRQ_GPIO_BASE + (x)) + +/* +* Until MP04 Groups -> 40 (exactly 39) Groups * 8 ~= 320 GPIOs +*/ +#define NR_IRQS (S3C_IRQ_GPIO(320) + 1)#endif /* __ASM_PLAT_S5PC1XX_IRQS_H */
arch/arm/plat-s5pc1xx/include/plat/regs-gpio.h new file +70 -0
70 lines not on this page · raw message
arch/arm/plat-s5pc1xx/irq-eint.c new file +281 -0
281 lines not on this page · raw message
arch/arm/plat-s5pc1xx/irq-gpio.c new file +266 -0
266 lines not on this page · raw message
arch/arm/plat-s5pc1xx/irq.c +1 -1
@@ -79,7 +79,7 @@ static void s3c_irq_timer_ack(unsigned int irq) {u32 reg =__raw_readl (S3C64XX_TINT_CSTAT ); - reg &=0x1f ; + reg &=0x1f ;/* mask out pending interrupts */ reg |= (1 <<5 ) << (irq -IRQ_TIMER0 );__raw_writel (reg,S3C64XX_TINT_CSTAT ); }
Signature · 1 line
1.6.4
PATCH 7/14 ARM: S5PC1XX: add cpu idle and system reset support
From: Kyungmin Park <[email protected]>
Add CPU idle support by a call to SoC build-in power management core. Add system reset support by a simple write to system controll register.
--- arch/arm/mach-s5pc100/cpu.c | 22 ++++++ arch/arm/mach-s5pc100/include/mach/system.h | 13 +++- arch/arm/plat-s3c/include/plat/cpu.h | 6 ++ arch/arm/plat-s5pc1xx/include/plat/regs-power.h | 84 +++++++++++++++++++++++ 4 files changed, 122 insertions(+), 3 deletions(-) create mode 100644 arch/arm/plat-s5pc1xx/include/plat/regs-power.h
arch/arm/mach-s5pc100/cpu.c +22 -0
@@ -22,6 +22,8 @@#include <linux/serial_core.h> #include <linux/platform_device.h> +#include <asm/proc-fns.h> +#include <asm/mach/arch.h> #include <asm/mach/map.h> #include <asm/mach/irq.h>
@@ -32,6 +34,7 @@#include <plat/cpu-freq.h> #include <plat/regs-serial.h> +#include <plat/regs-power.h> #include <plat/cpu.h> #include <plat/devs.h>
@@ -45,6 +48,23 @@static struct map_desc s5pc100_iodesc[]__initdata = { }; +static void s5pc100_idle (void ) +{ +unsigned long tmp; + + tmp =__raw_readl (S5PC100_PWR_CFG ); + tmp &= ~S5PC100_PWRCFG_CFG_DEEP_IDLE ; + tmp &= ~S5PC100_PWRCFG_CFG_WFI_MASK ; + tmp |=S5PC100_PWRCFG_CFG_WFI_DEEP_IDLE ; +__raw_writel (tmp,S5PC100_PWR_CFG ); + + tmp =__raw_readl (S5PC100_OTHERS ); + tmp |=S5PC100_PMU_INT_DISABLE ; +__raw_writel (tmp,S5PC100_OTHERS ); + +cpu_do_idle (); +} +/* s5pc100_map_io * * register the standard cpu IO areas
@@ -93,5 +113,7 @@ int __init s5pc100_init(void) {printk (KERN_DEBUG "S5PC100: Initialising architecture\n" ); + s5pc1xx_idle = s5pc100_idle; +return sysdev_register (&s5pc100_sysdev); }
arch/arm/mach-s5pc100/include/mach/system.h +10 -3
@@ -11,14 +11,21 @@#ifndef __ASM_ARCH_SYSTEM_H#define __ASM_ARCH_SYSTEM_H __FILE__ +#include <linux/io.h> +#include <mach/map.h> +#include <plat/regs-clock.h> + +void (*s5pc1xx_idle)(void ); +static void arch_idle (void ) { -/* nothing here yet */ +if (s5pc1xx_idle) +s5pc1xx_idle (); }static void arch_reset (char mode,const char *cmd) { -/* nothing here yet */ +__raw_writel (S5PC100_SWRESET_RESETVAL ,S5PC100_SWRESET ); +return ; } -#endif /* __ASM_ARCH_IRQ_H */
arch/arm/plat-s3c/include/plat/cpu.h +6 -0
@@ -12,6 +12,9 @@/* todo - fix when rmk changes iodescs to use `void __iomem *` */ +#ifndef __SAMSUNG_PLAT_CPU_H +#define __SAMSUNG_PLAT_CPU_H +#define IODESC_ENT (x) { (unsigned long)S3C24XX_VA_##x, __phys_to_pfn(S3C24XX_PA_##x), S3C24XX_SZ_##x, MT_DEVICE }#ifndef MHZ
@@ -73,3 +76,6 @@ extern struct sysdev_class s3c2443_sysclass;extern struct sysdev_class s3c6410_sysclass;extern struct sysdev_class s3c64xx_sysclass; +extern void (*s5pc1xx_idle)(void ); + +#endif
arch/arm/plat-s5pc1xx/include/plat/regs-power.h new file +84 -0
84 lines not on this page · raw message
Signature · 1 line
1.6.4
PATCH 8/14 ARM: S3C: Prepare s3c64xx-specific s3c-fb register definition for reuse
From: Pawel Osciak <[email protected]>
S5PC1xx Samsung SOC series has very similar frame buffer hardware, so a lot of the code can be shared. Moved s3c64xx-specific s3c-fb register definitions from mach-s3c6400 to common platform directory as regs-fb-v4.h. The new v4 file will be common for S3C6400, S3C6410, S5PC100 and possibly others. Some s3c64xx series specific defines (palette handling) were left in s3c-6400/mach/regs-fb.h, because it is handled differently in S5PC1xx series.
---
arch/arm/mach-s3c6400/include/mach/regs-fb.h | 236 +-------------------
.../include/plat/regs-fb-v4.h} | 32 +---
2 files changed, 13 insertions(+), 255 deletions(-)
copy arch/arm/{mach-s3c6400/include/mach/regs-fb.h => plat-s3c/include/plat/regs-fb-v4.h} (88%)arch/arm/mach-s3c6400/include/mach/regs-fb.h +9 -227
@@ -1,195 +1,30 @@ -/* arch/arm/mach-s3c6400/include/mach/regs-fb.h -* +/* * Copyright 2008 Openmoko, Inc. * Copyright 2008 Simtec Electronics -* http://armlinux.simtec.co.uk/ -* Ben Dooks <[email protected]> -* -* S3C64XX - new-style framebuffer register definitions +* Copyright 2009 Samsung Electronics Co. * -* This is the register set for the new style framebuffer interface -* found from the S3C2443 onwards and specifically the S3C64XX series -* S3C6400 and S3C6410. +* Pawel Osciak <[email protected]> +* Based on plat-s3c/include/plat/regs-fb.h by Ben Dooks <[email protected]> * -* The file contains the cpu specific items which change between whichever -* architecture is selected. See <plat/regs-fb.h> for the core definitions -* that are the same. +* Framebuffer register definitions for Samsung S3C64xx. * * 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 the core definitions here, in case we really do need to -* override them at a later date. -*/ - -#include <plat/regs-fb.h> - -#define S3C_FB_MAX_WIN (5)/* number of hardware windows available. */ -#define VIDCON1_FSTATUS_EVEN (1 << 15) - -/* Video timing controls */ -#define VIDTCON0 (0x10) -#define VIDTCON1 (0x14) -#define VIDTCON2 (0x18) - -/* Window position controls */ - -#define WINCON (_win) (0x20 + ((_win) * 4)) - -/* OSD1 and OSD4 do not have register D */ - -#define VIDOSD_A (_win) (0x40 + ((_win) * 16)) -#define VIDOSD_B (_win) (0x44 + ((_win) * 16)) -#define VIDOSD_C (_win) (0x48 + ((_win) * 16)) -#define VIDOSD_D (_win) (0x4C + ((_win) * 16)) - -/* Video buffer addresses */ - -#define VIDW_BUF_START (_buff) (0xA0 + ((_buff) * 8)) -#define VIDW_BUF_START1 (_buff) (0xA4 + ((_buff) * 8)) -#define VIDW_BUF_END (_buff) (0xD0 + ((_buff) * 8)) -#define VIDW_BUF_END1 (_buff) (0xD4 + ((_buff) * 8)) -#define VIDW_BUF_SIZE (_buff) (0x100 + ((_buff) * 4)) - -#define VIDINTCON0 (0x130) - -#define WxKEYCONy (_win, _con) ((0x140 + ((_win) * 8)) + ((_con) * 4)) - -/* WINCONx */ - -#define WINCONx_CSCWIDTH_MASK (0x3 << 26) -#define WINCONx_CSCWIDTH_SHIFT (26) -#define WINCONx_CSCWIDTH_WIDE (0x0 << 26) -#define WINCONx_CSCWIDTH_NARROW (0x3 << 26) - -#define WINCONx_ENLOCAL (1 << 22) -#define WINCONx_BUFSTATUS (1 << 21) -#define WINCONx_BUFSEL (1 << 20) -#define WINCONx_BUFAUTOEN (1 << 19) -#define WINCONx_YCbCr (1 << 13) - -#define WINCON1_LOCALSEL_CAMIF (1 << 23) - -#define WINCON2_LOCALSEL_CAMIF (1 << 23) -#define WINCON2_BLD_PIX (1 << 6) - -#define WINCON2_ALPHA_SEL (1 << 1) -#define WINCON2_BPPMODE_MASK (0xf << 2) -#define WINCON2_BPPMODE_SHIFT (2) -#define WINCON2_BPPMODE_1BPP (0x0 << 2) -#define WINCON2_BPPMODE_2BPP (0x1 << 2) -#define WINCON2_BPPMODE_4BPP (0x2 << 2) -#define WINCON2_BPPMODE_8BPP_1232 (0x4 << 2) -#define WINCON2_BPPMODE_16BPP_565 (0x5 << 2) -#define WINCON2_BPPMODE_16BPP_A1555 (0x6 << 2) -#define WINCON2_BPPMODE_16BPP_I1555 (0x7 << 2) -#define WINCON2_BPPMODE_18BPP_666 (0x8 << 2) -#define WINCON2_BPPMODE_18BPP_A1665 (0x9 << 2) -#define WINCON2_BPPMODE_19BPP_A1666 (0xa << 2) -#define WINCON2_BPPMODE_24BPP_888 (0xb << 2) -#define WINCON2_BPPMODE_24BPP_A1887 (0xc << 2) -#define WINCON2_BPPMODE_25BPP_A1888 (0xd << 2) -#define WINCON2_BPPMODE_28BPP_A4888 (0xd << 2) - -#define WINCON3_BLD_PIX (1 << 6) - -#define WINCON3_ALPHA_SEL (1 << 1) -#define WINCON3_BPPMODE_MASK (0xf << 2) -#define WINCON3_BPPMODE_SHIFT (2) -#define WINCON3_BPPMODE_1BPP (0x0 << 2) -#define WINCON3_BPPMODE_2BPP (0x1 << 2) -#define WINCON3_BPPMODE_4BPP (0x2 << 2) -#define WINCON3_BPPMODE_16BPP_565 (0x5 << 2) -#define WINCON3_BPPMODE_16BPP_A1555 (0x6 << 2) -#define WINCON3_BPPMODE_16BPP_I1555 (0x7 << 2) -#define WINCON3_BPPMODE_18BPP_666 (0x8 << 2) -#define WINCON3_BPPMODE_18BPP_A1665 (0x9 << 2) -#define WINCON3_BPPMODE_19BPP_A1666 (0xa << 2) -#define WINCON3_BPPMODE_24BPP_888 (0xb << 2) -#define WINCON3_BPPMODE_24BPP_A1887 (0xc << 2) -#define WINCON3_BPPMODE_25BPP_A1888 (0xd << 2) -#define WINCON3_BPPMODE_28BPP_A4888 (0xd << 2) - -#define VIDINTCON0_FIFIOSEL_WINDOW2 (0x10 << 5) -#define VIDINTCON0_FIFIOSEL_WINDOW3 (0x20 << 5) -#define VIDINTCON0_FIFIOSEL_WINDOW4 (0x40 << 5) - -#define DITHMODE (0x170) -#define WINxMAP (_win) (0x180 + ((_win) * 4)) - - -#define DITHMODE_R_POS_MASK (0x3 << 5) -#define DITHMODE_R_POS_SHIFT (5) -#define DITHMODE_R_POS_8BIT (0x0 << 5) -#define DITHMODE_R_POS_6BIT (0x1 << 5) -#define DITHMODE_R_POS_5BIT (0x2 << 5) - -#define DITHMODE_G_POS_MASK (0x3 << 3) -#define DITHMODE_G_POS_SHIFT (3) -#define DITHMODE_G_POS_8BIT (0x0 << 3) -#define DITHMODE_G_POS_6BIT (0x1 << 3) -#define DITHMODE_G_POS_5BIT (0x2 << 3) - -#define DITHMODE_B_POS_MASK (0x3 << 1) -#define DITHMODE_B_POS_SHIFT (1) -#define DITHMODE_B_POS_8BIT (0x0 << 1) -#define DITHMODE_B_POS_6BIT (0x1 << 1) -#define DITHMODE_B_POS_5BIT (0x2 << 1) +#ifndef __ASM_ARCH_MACH_REGS_FB_H +#define __ASM_ARCH_MACH_REGS_FB_H __FILE__ -#define DITHMODE_DITH_EN (1 << 0) - -#define WPALCON (0x1A0) - -#define WPALCON_W4PAL_16BPP_A555 (1 << 8) -#define WPALCON_W3PAL_16BPP_A555 (1 << 7) -#define WPALCON_W2PAL_16BPP_A555 (1 << 6) +#include <plat/regs-fb-v4.h> /* Palette registers */ -#define WIN2_PAL (_entry) (0x300 + ((_entry) * 2))#define WIN3_PAL (_entry) (0x320 + ((_entry) * 2))#define WIN4_PAL (_entry) (0x340 + ((_entry) * 2))#define WIN0_PAL (_entry) (0x400 + ((_entry) * 4))#define WIN1_PAL (_entry) (0x800 + ((_entry) * 4)) -/* system specific implementation code for palette sizes, and other -* information that changes depending on which architecture is being -* compiled. -*/ - -/* return true if window _win has OSD register D */ -#define s3c_fb_has_osd_d (_win) ((_win) != 4 && (_win) != 0) - -static inline unsigned int s3c_fb_win_pal_size (unsigned int win) -{ -if (win <2 ) -return 256 ; -if (win <4 ) -return 16 ; -if (win ==4 ) -return 4 ; - -BUG ();/* shouldn't get here */ -} - -static inline int s3c_fb_validate_win_bpp (unsigned int win,unsigned int bpp) -{ -/* all windows can do 1/2 bpp */ - -if ((bpp ==25 || bpp ==19 ) && win ==0 ) -return 0 ;/* win 0 does not have 19 or 25bpp modes */ - -if (bpp ==4 && win ==4 ) -return 0 ; - -if (bpp ==8 && (win >=3 )) -return 0 ;/* win 3/4 cannot do 8bpp in any mode */ - -return 1 ; -} -static inline unsigned int s3c_fb_pal_reg (unsigned int window,int reg) {switch (window) {
@@ -203,57 +38,4 @@ static inline unsigned int s3c_fb_pal_reg(unsigned int window, int reg) BUG(); } -static inline int s3c_fb_pal_is16 (unsigned int window) -{ -return window >1 ; -} - -struct s3c_fb_palette { -struct fb_bitfield r; -struct fb_bitfield g; -struct fb_bitfield b; -struct fb_bitfield a; -}; - -static inline void s3c_fb_init_palette (unsigned int window, -struct s3c_fb_palette *palette) -{ -if (window <2 ) { -/* Windows 0/1 are 8/8/8 or A/8/8/8 */ - palette->r.offset =16 ; - palette->r.length =8 ; - palette->g.offset =8 ; - palette->g.length =8 ; - palette->b.offset =0 ; - palette->b.length =8 ; - }else { -/* currently we assume RGB 5/6/5 */ - palette->r.offset =11 ; - palette->r.length =5 ; - palette->g.offset =5 ; - palette->g.length =6 ; - palette->b.offset =0 ; - palette->b.length =5 ; - } -} - -/* Notes on per-window bpp settings -* -* Value Win0 Win1 Win2 Win3 Win 4 -* 0000 1(P) 1(P) 1(P) 1(P) 1(P) -* 0001 2(P) 2(P) 2(P) 2(P) 2(P) -* 0010 4(P) 4(P) 4(P) 4(P) -none- -* 0011 8(P) 8(P) -none- -none- -none- -* 0100 -none- 8(A232) 8(A232) -none- -none- -* 0101 16(565) 16(565) 16(565) 16(565) 16(565) -* 0110 -none- 16(A555) 16(A555) 16(A555) 16(A555) -* 0111 16(I555) 16(I565) 16(I555) 16(I555) 16(I555) -* 1000 18(666) 18(666) 18(666) 18(666) 18(666) -* 1001 -none- 18(A665) 18(A665) 18(A665) 16(A665) -* 1010 -none- 19(A666) 19(A666) 19(A666) 19(A666) -* 1011 24(888) 24(888) 24(888) 24(888) 24(888) -* 1100 -none- 24(A887) 24(A887) 24(A887) 24(A887) -* 1101 -none- 25(A888) 25(A888) 25(A888) 25(A888) -* 1110 -none- -none- -none- -none- -none- -* 1111 -none- -none- -none- -none- -none- -*/ +#endif /* __ASM_ARCH_MACH_REGS_FB_H */
arch/arm/plat-s3c/include/plat/regs-fb-v4.h renamed from arch/arm/mach-s3c6400/include/mach/regs-fb.h +4 -28
@@ -1,4 +1,4 @@ -/* arch/arm/mach-s3c6400/include/mach/regs-fb.h +/* arch/arm/plat-s3c/include/plat/regs-fb-v4.h * * Copyright 2008 Openmoko, Inc. * Copyright 2008 Simtec Electronics
@@ -45,13 +45,6 @@#define VIDOSD_C (_win) (0x48 + ((_win) * 16))#define VIDOSD_D (_win) (0x4C + ((_win) * 16)) -/* Video buffer addresses */ - -#define VIDW_BUF_START (_buff) (0xA0 + ((_buff) * 8)) -#define VIDW_BUF_START1 (_buff) (0xA4 + ((_buff) * 8)) -#define VIDW_BUF_END (_buff) (0xD0 + ((_buff) * 8)) -#define VIDW_BUF_END1 (_buff) (0xD4 + ((_buff) * 8)) -#define VIDW_BUF_SIZE (_buff) (0x100 + ((_buff) * 4))#define VIDINTCON0 (0x130)
@@ -142,17 +135,13 @@#define WPALCON (0x1A0) +/* Palette control */ +/* Note for S5PC100: you can still use those macros on WPALCON (aka WPALCON_L), +* but make sure that WPALCON_H W2PAL-W4PAL entries are zeroed out */ #define WPALCON_W4PAL_16BPP_A555 (1 << 8)#define WPALCON_W3PAL_16BPP_A555 (1 << 7)#define WPALCON_W2PAL_16BPP_A555 (1 << 6) -/* Palette registers */ - -#define WIN2_PAL (_entry) (0x300 + ((_entry) * 2)) -#define WIN3_PAL (_entry) (0x320 + ((_entry) * 2)) -#define WIN4_PAL (_entry) (0x340 + ((_entry) * 2)) -#define WIN0_PAL (_entry) (0x400 + ((_entry) * 4)) -#define WIN1_PAL (_entry) (0x800 + ((_entry) * 4))/* system specific implementation code for palette sizes, and other * information that changes depending on which architecture is being
@@ -190,19 +179,6 @@ static inline int s3c_fb_validate_win_bpp(unsigned int win, unsigned int bpp)return 1 ; } -static inline unsigned int s3c_fb_pal_reg (unsigned int window,int reg) -{ -switch (window) { -case 0 :return WIN0_PAL (reg); -case 1 :return WIN1_PAL (reg); -case 2 :return WIN2_PAL (reg); -case 3 :return WIN3_PAL (reg); -case 4 :return WIN4_PAL (reg); - } - -BUG (); -} -static inline int s3c_fb_pal_is16 (unsigned int window) {return window >1 ;
Signature · 1 line
1.6.4
PATCH 9/14 ARM: S5PC1xx: add platform helpers for s3c-fb device
From: Pawel Osciak <[email protected]>
Samsung S5PC100 has LCD-controller compatible with the one known from previous SoCs series. Add required platform setup and support code that it can be used with s3c-fb driver.
--- arch/arm/mach-s5pc100/include/mach/irqs.h | 5 + arch/arm/mach-s5pc100/include/mach/regs-fb.h | 139 ++++++++++++++++++++++++++ arch/arm/plat-s3c/include/plat/fb.h | 7 ++ arch/arm/plat-s5pc1xx/Kconfig | 5 + arch/arm/plat-s5pc1xx/Makefile | 1 + arch/arm/plat-s5pc1xx/setup-fb-24bpp.c | 49 +++++++++ 6 files changed, 206 insertions(+), 0 deletions(-) create mode 100644 arch/arm/mach-s5pc100/include/mach/regs-fb.h create mode 100644 arch/arm/plat-s5pc1xx/setup-fb-24bpp.c
arch/arm/mach-s5pc100/include/mach/irqs.h +5 -0
@@ -11,4 +11,9 @@#include <plat/irqs.h> +/* LCD */ +#define IRQ_LCD_FIFO IRQ_LCD0 +#define IRQ_LCD_VSYNC IRQ_LCD1 +#define IRQ_LCD_SYSTEM IRQ_LCD2 +#endif /* __ASM_ARCH_IRQ_H */
arch/arm/mach-s5pc100/include/mach/regs-fb.h new file +139 -0
139 lines not on this page · raw message
arch/arm/plat-s3c/include/plat/fb.h +7 -0
@@ -70,4 +70,11 @@ extern void s3c_fb_set_platdata(struct s3c_fb_platdata *pd);*/ extern void s3c64xx_fb_gpio_setup_24bpp (void ); +/** +* s5pc100_fb_gpio_setup_24bpp() - S5PC100 setup function for 24bpp LCD +* +* Initialise the GPIO for an 24bpp LCD display on the RGB interface. +*/ +extern void s5pc100_fb_gpio_setup_24bpp (void ); +#endif /* __PLAT_S3C_FB_H */
arch/arm/plat-s5pc1xx/Kconfig +5 -0
@@ -37,6 +37,11 @@ config CPU_S5PC100_CLOCK # platform specific device setup +config S5PC1XX_SETUP_FB_24BPP + bool + help + Common setup code for S5PC1XX with an 24bpp RGB display helper. + config S5PC100_SETUP_I2C0 bool default y
arch/arm/plat-s5pc1xx/Makefile +1 -0
@@ -25,5 +25,6 @@ obj-$(CONFIG_CPU_S5PC100_CLOCK) += s5pc100-clock.o # Device setup obj-$(CONFIG_S5P_GPIO_CFG_S5PC1XX) += gpio-config.o +obj-$(CONFIG_S5PC1XX_SETUP_FB_24BPP) += setup-fb-24bpp.o obj-$(CONFIG_S5PC100_SETUP_I2C0) += setup-i2c0.o obj-$(CONFIG_S5PC100_SETUP_I2C1) += setup-i2c1.o
arch/arm/plat-s5pc1xx/setup-fb-24bpp.c new file +49 -0
49 lines not on this page · raw message
Signature · 1 line
1.6.4
PATCH 10/14 SMDKC100: enable S3C FrameBuffer
From: Kyungmin Park <[email protected]>
Add required machine definitions for s3c-fb device.
A 800x480 lcd device (simmilar to the one known from SMDK6410 boards) has been defined. The lcd controller is attached to GPIO lines and can be enabled/disabled with platform-lcd driver.
--- arch/arm/mach-s5pc100/Kconfig | 2 + arch/arm/mach-s5pc100/mach-smdkc100.c | 67 +++++++++++++++++++++++++++++++++ 2 files changed, 69 insertions(+), 0 deletions(-)
arch/arm/mach-s5pc100/Kconfig +2 -0
@@ -17,6 +17,8 @@ config CPU_S5PC100 config MACH_SMDKC100 bool "SMDKC100" select CPU_S5PC100 + select S3C_DEV_FB select S5PC1XX_SETUP_I2C1 + select S5PC1XX_SETUP_FB_24BPP help Machine support for the Samsung SMDKC100
arch/arm/mach-s5pc100/mach-smdkc100.c +67 -0
98 lines not on this page · raw message
Signature · 1 line
1.6.4
PATCH 11/14 ARM: S5PC1xx: add platform helpers for i2c adapter devices
From: Kyungmin Park <[email protected]>
Samsung S5PC100 has I2C bus controller compatible with the one known from previous SoCs series. Add required platform setup and support code that it can be used with s3c2410-i2c driver.
--- arch/arm/mach-s5pc100/cpu.c | 4 ++++ arch/arm/plat-s5pc1xx/Kconfig | 4 ++-- arch/arm/plat-s5pc1xx/Makefile | 4 ++-- arch/arm/plat-s5pc1xx/setup-i2c0.c | 7 ++++++- arch/arm/plat-s5pc1xx/setup-i2c1.c | 7 ++++++- 5 files changed, 20 insertions(+), 6 deletions(-)
arch/arm/mach-s5pc100/cpu.c +4 -0
@@ -75,6 +75,10 @@ void __init s5pc100_map_io(void)iotable_init (s5pc100_iodesc,ARRAY_SIZE (s5pc100_iodesc));/* initialise device information early */ + +/* the i2c devices are directly compatible with s3c2440 */ +s3c_i2c0_setname ("s3c2440-i2c" ); +s3c_i2c1_setname ("s3c2440-i2c" ); }void __init s5pc100_init_clocks (int xtal)
arch/arm/plat-s5pc1xx/Kconfig +2 -2
@@ -42,7 +42,7 @@ config S5PC1XX_SETUP_FB_24BPP help Common setup code for S5PC1XX with an 24bpp RGB display helper. -config S5PC100_SETUP_I2C0 +config S5PC1XX_SETUP_I2C0 bool default y help
@@ -51,7 +51,7 @@ config S5PC100_SETUP_I2C0 Note, currently since i2c0 is always compiled, this setup helper is always compiled with it. -config S5PC100_SETUP_I2C1 +config S5PC1XX_SETUP_I2C1 bool help Common setup code for i2c bus 1.
arch/arm/plat-s5pc1xx/Makefile +2 -2
@@ -26,5 +26,5 @@ obj-$(CONFIG_CPU_S5PC100_CLOCK) += s5pc100-clock.o obj-$(CONFIG_S5P_GPIO_CFG_S5PC1XX) += gpio-config.o obj-$(CONFIG_S5PC1XX_SETUP_FB_24BPP) += setup-fb-24bpp.o -obj-$(CONFIG_S5PC100_SETUP_I2C0) += setup-i2c0.o -obj-$(CONFIG_S5PC100_SETUP_I2C1) += setup-i2c1.o +obj-$(CONFIG_S5PC1XX_SETUP_I2C0) += setup-i2c0.o +obj-$(CONFIG_S5PC1XX_SETUP_I2C1) += setup-i2c1.o
arch/arm/plat-s5pc1xx/setup-i2c0.c +6 -1
@@ -17,9 +17,14 @@struct platform_device ;/* don't need the contents */ +#include <linux/gpio.h> #include <plat/iic.h> +#include <plat/gpio-cfg.h> void s3c_i2c0_cfg_gpio (struct platform_device *dev) { -/* Pin configuration would be needed */ +s3c_gpio_cfgpin (S5PC100_GPD (3 ),S3C_GPIO_SFN (2 )); +s3c_gpio_setpull (S5PC100_GPD (3 ),S3C_GPIO_PULL_UP ); +s3c_gpio_cfgpin (S5PC100_GPD (4 ),S3C_GPIO_SFN (2 )); +s3c_gpio_setpull (S5PC100_GPD (4 ),S3C_GPIO_PULL_UP ); }
arch/arm/plat-s5pc1xx/setup-i2c1.c +6 -1
@@ -17,9 +17,14 @@struct platform_device ;/* don't need the contents */ +#include <linux/gpio.h> #include <plat/iic.h> +#include <plat/gpio-cfg.h> void s3c_i2c1_cfg_gpio (struct platform_device *dev) { -/* Pin configuration would be needed */ +s3c_gpio_cfgpin (S5PC100_GPD (5 ),S3C_GPIO_SFN (2 )); +s3c_gpio_setpull (S5PC100_GPD (5 ),S3C_GPIO_PULL_UP ); +s3c_gpio_cfgpin (S5PC100_GPD (6 ),S3C_GPIO_SFN (2 )); +s3c_gpio_setpull (S5PC100_GPD (6 ),S3C_GPIO_PULL_UP ); }
Signature · 1 line
1.6.4
PATCH 12/14 SMDKC100: add I2C0 and I2C1 buses support
From: Kyungmin Park <[email protected]>
Add required machine definitions for I2C 0 and 1 bus controllers. Currently no I2C device are defined yet.
--- arch/arm/mach-s5pc100/Kconfig | 2 ++ arch/arm/mach-s5pc100/mach-smdkc100.c | 17 +++++++++++++++++ 2 files changed, 19 insertions(+), 0 deletions(-)
arch/arm/mach-s5pc100/Kconfig +2 -0
@@ -18,6 +18,8 @@ config MACH_SMDKC100 bool "SMDKC100" select CPU_S5PC100 select S3C_DEV_FB + select S3C_DEV_I2C1 + select S5PC1XX_SETUP_I2C0 select S5PC1XX_SETUP_I2C1 select S5PC1XX_SETUP_FB_24BPP help
arch/arm/mach-s5pc100/mach-smdkc100.c +17 -0
@@ -42,6 +42,7 @@#include <plat/cpu.h> #include <plat/s5pc100.h> #include <plat/fb.h> +#include <plat/iic.h> #define UCON (S3C2410_UCON_DEFAULT | S3C2410_UCON_UCLK)#define ULCON (S3C2410_LCON_CS8 | S3C2410_LCON_PNONE | S3C2410_LCON_STOPB)
@@ -78,6 +79,14 @@ static struct s3c2410_uartcfg smdkc100_uartcfgs[] __initdata = { }, }; +/* I2C0 */ +static struct i2c_board_info i2c_devs0[]__initdata = { +}; + +/* I2C1 */ +static struct i2c_board_info i2c_devs1[]__initdata = { +}; +/* LCD power controller */ static void smdkc100_lcd_power_set (struct plat_lcd_data *pd,unsigned int power)
@@ -135,6 +144,8 @@ static struct s3c_fb_platdata smdkc100_lcd_pdata __initdata = {static struct map_desc smdkc100_iodesc[] = {};static struct platform_device *smdkc100_devices[]__initdata = { + &s3c_device_i2c0, + &s3c_device_i2c1, &s3c_device_fb, &smdkc100_lcd_powerdev, };
@@ -148,6 +159,12 @@ static void __init smdkc100_map_io(void)static void __init smdkc100_machine_init (void ) { +/* I2C */ +s3c_i2c0_set_platdata (NULL ); +s3c_i2c1_set_platdata (NULL ); +i2c_register_board_info (0 , i2c_devs0,ARRAY_SIZE (i2c_devs0)); +i2c_register_board_info (1 , i2c_devs1,ARRAY_SIZE (i2c_devs1)); +s3c_fb_set_platdata (&smdkc100_lcd_pdata);/* LCD init */
Signature · 1 line
1.6.4
PATCH 13/14 ARM: S5PC1xx: add platform helpers for SDHCI host controllers
From: Kyungmin Park <[email protected]>
Samsung S5PC100 has 3 SDHCI controllers compatible with the one known from previous SoCs series. Add required platform setup and support code that the devices can be used with sdhci-s3c driver.
--- arch/arm/mach-s5pc100/Kconfig | 6 ++ arch/arm/mach-s5pc100/Makefile | 4 ++ arch/arm/mach-s5pc100/cpu.c | 3 + arch/arm/mach-s5pc100/setup-sdhci.c | 65 ++++++++++++++++++++++ arch/arm/plat-s3c/Kconfig | 5 ++ arch/arm/plat-s3c/Makefile | 1 + arch/arm/plat-s3c/dev-hsmmc2.c | 65 ++++++++++++++++++++++ arch/arm/plat-s3c/include/plat/sdhci.h | 55 +++++++++++++++++++ arch/arm/plat-s5pc1xx/Kconfig | 6 ++ arch/arm/plat-s5pc1xx/Makefile | 1 + arch/arm/plat-s5pc1xx/setup-sdhci-gpio.c | 86 ++++++++++++++++++++++++++++++ 11 files changed, 297 insertions(+), 0 deletions(-) create mode 100644 arch/arm/mach-s5pc100/setup-sdhci.c create mode 100644 arch/arm/plat-s3c/dev-hsmmc2.c create mode 100644 arch/arm/plat-s5pc1xx/setup-sdhci-gpio.c
arch/arm/mach-s5pc100/Kconfig +6 -0
@@ -14,6 +14,12 @@ config CPU_S5PC100 help Enable S5PC100 CPU support +config S5PC100_SETUP_SDHCI + bool + select S5PC1XX_SETUP_SDHCI_GPIO + help + Internal helper functions for S5PC100 based SDHCI systems + config MACH_SMDKC100 bool "SMDKC100" select CPU_S5PC100
arch/arm/mach-s5pc100/Makefile +4 -0
@@ -13,5 +13,9 @@ obj- := obj-$(CONFIG_CPU_S5PC100) += cpu.o +# Helper and device support + +obj-$(CONFIG_S5PC100_SETUP_SDHCI) += setup-sdhci.o + # machine support obj-$(CONFIG_MACH_SMDKC100) += mach-smdkc100.o
arch/arm/mach-s5pc100/cpu.c +3 -0
@@ -75,6 +75,9 @@ void __init s5pc100_map_io(void)iotable_init (s5pc100_iodesc,ARRAY_SIZE (s5pc100_iodesc));/* initialise device information early */ +s5pc100_default_sdhci0 (); +s5pc100_default_sdhci1 (); +s5pc100_default_sdhci2 ();/* the i2c devices are directly compatible with s3c2440 */ s3c_i2c0_setname ("s3c2440-i2c" );
arch/arm/mach-s5pc100/setup-sdhci.c new file +65 -0
65 lines not on this page · raw message
arch/arm/plat-s3c/Kconfig +5 -0
@@ -184,6 +184,11 @@ config S3C_DEV_HSMMC1 help Compile in platform device definitions for HSMMC channel 1 +config S3C_DEV_HSMMC2 + bool + help + Compile in platform device definitions for HSMMC channel 2 + config S3C_DEV_I2C1 bool help
arch/arm/plat-s3c/Makefile +1 -0
@@ -36,6 +36,7 @@ obj-$(CONFIG_HAVE_PWM) += pwm.o obj-$(CONFIG_S3C_DEV_HSMMC) += dev-hsmmc.o obj-$(CONFIG_S3C_DEV_HSMMC1) += dev-hsmmc1.o +obj-$(CONFIG_S3C_DEV_HSMMC2) += dev-hsmmc2.o obj-y += dev-i2c0.o obj-$(CONFIG_S3C_DEV_I2C1) += dev-i2c1.o obj-$(CONFIG_S3C_DEV_FB) += dev-fb.o
arch/arm/plat-s3c/dev-hsmmc2.c new file +65 -0
65 lines not on this page · raw message
arch/arm/plat-s3c/include/plat/sdhci.h +55 -0
76 lines not on this page · raw message
arch/arm/plat-s5pc1xx/Kconfig +6 -0
@@ -55,4 +55,10 @@ config S5PC1XX_SETUP_I2C1 bool help Common setup code for i2c bus 1. + +config S5PC1XX_SETUP_SDHCI_GPIO + bool + help + Common setup code for SDHCI gpio. + endif
arch/arm/plat-s5pc1xx/Makefile +1 -0
@@ -28,3 +28,4 @@ obj-$(CONFIG_S5P_GPIO_CFG_S5PC1XX) += gpio-config.o obj-$(CONFIG_S5PC1XX_SETUP_FB_24BPP) += setup-fb-24bpp.o obj-$(CONFIG_S5PC1XX_SETUP_I2C0) += setup-i2c0.o obj-$(CONFIG_S5PC1XX_SETUP_I2C1) += setup-i2c1.o +obj-$(CONFIG_S5PC1XX_SETUP_SDHCI_GPIO) += setup-sdhci-gpio.o
arch/arm/plat-s5pc1xx/setup-sdhci-gpio.c new file +86 -0
86 lines not on this page · raw message
Signature · 1 line
1.6.4
PATCH 14/14 SMDKC100: add SDHCI controllers 0, 1 and 2 support
From: Kyungmin Park <[email protected]>
Add required machine definitions for SDHCI controller 0, 1 and 2. SMDKC100 has 2 SDHCI/MMC ports. Port 1 is directly connected to controller 0. Port 1 can be conntected to controler 1 or 2, depending on jumper setup.
--- arch/arm/mach-s5pc100/Kconfig | 4 ++++ arch/arm/mach-s5pc100/mach-smdkc100.c | 3 +++ 2 files changed, 7 insertions(+), 0 deletions(-)
arch/arm/mach-s5pc100/Kconfig +4 -0
@@ -25,8 +25,12 @@ config MACH_SMDKC100 select CPU_S5PC100 select S3C_DEV_FB select S3C_DEV_I2C1 + select S3C_DEV_HSMMC + select S3C_DEV_HSMMC1 + select S3C_DEV_HSMMC2 select S5PC1XX_SETUP_I2C0 select S5PC1XX_SETUP_I2C1 select S5PC1XX_SETUP_FB_24BPP + select S5PC100_SETUP_SDHCI help Machine support for the Samsung SMDKC100
arch/arm/mach-s5pc100/mach-smdkc100.c +3 -0
@@ -147,6 +147,9 @@ static struct platform_device *smdkc100_devices[] __initdata = { &s3c_device_i2c0, &s3c_device_i2c1, &s3c_device_fb, + &s3c_device_hsmmc0, + &s3c_device_hsmmc1, + &s3c_device_hsmmc2, &smdkc100_lcd_powerdev, };
Signature · 1 line
1.6.4
PATCH v3 1/1 Update Samsung S5PC100 SoC support
In reply to Marek SzyprowskiQuoted 9 lines · Marek Szyprowski
Hello,
This patch series updates Samsung S5PC100 SoC support. S5PC100 platform core has been extended with new clocks hierarchy implementation, gpio lib, support for external and gpio interrupts and some basics of power management (cpu idle and system reset). Also platform helpers for s3c framebuffer, i2c and hsmmc drivers has been added.
All these patches has been tested on SMDKC100 board.
Hi, next time, --no-chain-reply-to please so that we don't end up with messages wandering off the edge of the screen.
Signature · 4 lines
Ben Q: What's a light-year? A: One-third less calories than a regular year.
PATCH v3 1/1 Update Samsung S5PC100 SoC support
In reply to Marek SzyprowskiQuoted 1 line · Marek Szyprowski
Hello,
ok, series applied and pushed to git.fluff.org.
Will do a quick build test and then get on with other stuff.
Signature · 4 lines
Ben Q: What's a light-year? A: One-third less calories than a regular year.
PATCH v3 1/1 Update Samsung S5PC100 SoC support
Hello,
Quoted 6 lines · Ben Dooks
Quoted 1 line · Marek Szyprowski
Hello,
ok, series applied and pushed to git.fluff.org.
Will do a quick build test and then get on with other stuff.
Thanks. Let me know if you get any problems.
Best regards
--
Marek Szyprowski
Samsung Poland R&D Center