diff --git a/[refs] b/[refs] index c44a3fd54e6f..9e1aec83f696 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: f56d463423b825ff5bf4b63e0dc443557934165c +refs/heads/master: cdb216de6e3291493f6bd033f2eec49c80dc8015 diff --git a/trunk/arch/arm/Kconfig b/trunk/arch/arm/Kconfig index 5ecaec63a47b..d56d21c0573b 100644 --- a/trunk/arch/arm/Kconfig +++ b/trunk/arch/arm/Kconfig @@ -738,7 +738,6 @@ config ARCH_S5PV310 select ARCH_SPARSEMEM_ENABLE select GENERIC_GPIO select HAVE_CLK - select ARCH_HAS_CPUFREQ select GENERIC_CLOCKEVENTS select HAVE_S3C_RTC if RTC_CLASS select HAVE_S3C2410_I2C if I2C diff --git a/trunk/arch/arm/mach-s3c2410/bast-irq.c b/trunk/arch/arm/mach-s3c2410/bast-irq.c index 606cb6b1cc47..217b102866d0 100644 --- a/trunk/arch/arm/mach-s3c2410/bast-irq.c +++ b/trunk/arch/arm/mach-s3c2410/bast-irq.c @@ -75,38 +75,38 @@ static unsigned char bast_pc104_irqmasks[] = { static unsigned char bast_pc104_irqs[] = { 3, 5, 7, 10 }; static void -bast_pc104_mask(struct irq_data *data) +bast_pc104_mask(unsigned int irqno) { unsigned long temp; temp = __raw_readb(BAST_VA_PC104_IRQMASK); - temp &= ~bast_pc104_irqmasks[data->irq]; + temp &= ~bast_pc104_irqmasks[irqno]; __raw_writeb(temp, BAST_VA_PC104_IRQMASK); } static void -bast_pc104_maskack(struct irq_data *data) +bast_pc104_maskack(unsigned int irqno) { struct irq_desc *desc = irq_desc + IRQ_ISA; - bast_pc104_mask(data); - desc->irq_data.chip->irq_ack(&desc->irq_data); + bast_pc104_mask(irqno); + desc->chip->ack(IRQ_ISA); } static void -bast_pc104_unmask(struct irq_data *data) +bast_pc104_unmask(unsigned int irqno) { unsigned long temp; temp = __raw_readb(BAST_VA_PC104_IRQMASK); - temp |= bast_pc104_irqmasks[data->irq]; + temp |= bast_pc104_irqmasks[irqno]; __raw_writeb(temp, BAST_VA_PC104_IRQMASK); } static struct irq_chip bast_pc104_chip = { - .irq_mask = bast_pc104_mask, - .irq_unmask = bast_pc104_unmask, - .irq_ack = bast_pc104_maskack + .mask = bast_pc104_mask, + .unmask = bast_pc104_unmask, + .ack = bast_pc104_maskack }; static void @@ -123,7 +123,7 @@ bast_irq_pc104_demux(unsigned int irq, /* ack if we get an irq with nothing (ie, startup) */ desc = irq_desc + IRQ_ISA; - desc->irq_data.chip->irq_ack(&desc->irq_data); + desc->chip->ack(IRQ_ISA); } else { /* handle the IRQ */ diff --git a/trunk/arch/arm/mach-s3c2412/irq.c b/trunk/arch/arm/mach-s3c2412/irq.c index eddb52ba5b65..6000ca9d1815 100644 --- a/trunk/arch/arm/mach-s3c2412/irq.c +++ b/trunk/arch/arm/mach-s3c2412/irq.c @@ -49,9 +49,9 @@ */ static void -s3c2412_irq_mask(struct irq_data *data) +s3c2412_irq_mask(unsigned int irqno) { - unsigned long bitval = 1UL << (data->irq - IRQ_EINT0); + unsigned long bitval = 1UL << (irqno - IRQ_EINT0); unsigned long mask; mask = __raw_readl(S3C2410_INTMSK); @@ -62,9 +62,9 @@ s3c2412_irq_mask(struct irq_data *data) } static inline void -s3c2412_irq_ack(struct irq_data *data) +s3c2412_irq_ack(unsigned int irqno) { - unsigned long bitval = 1UL << (data->irq - IRQ_EINT0); + unsigned long bitval = 1UL << (irqno - IRQ_EINT0); __raw_writel(bitval, S3C2412_EINTPEND); __raw_writel(bitval, S3C2410_SRCPND); @@ -72,9 +72,9 @@ s3c2412_irq_ack(struct irq_data *data) } static inline void -s3c2412_irq_maskack(struct irq_data *data) +s3c2412_irq_maskack(unsigned int irqno) { - unsigned long bitval = 1UL << (data->irq - IRQ_EINT0); + unsigned long bitval = 1UL << (irqno - IRQ_EINT0); unsigned long mask; mask = __raw_readl(S3C2410_INTMSK); @@ -89,9 +89,9 @@ s3c2412_irq_maskack(struct irq_data *data) } static void -s3c2412_irq_unmask(struct irq_data *data) +s3c2412_irq_unmask(unsigned int irqno) { - unsigned long bitval = 1UL << (data->irq - IRQ_EINT0); + unsigned long bitval = 1UL << (irqno - IRQ_EINT0); unsigned long mask; mask = __raw_readl(S3C2412_EINTMASK); @@ -102,11 +102,11 @@ s3c2412_irq_unmask(struct irq_data *data) } static struct irq_chip s3c2412_irq_eint0t4 = { - .irq_ack = s3c2412_irq_ack, - .irq_mask = s3c2412_irq_mask, - .irq_unmask = s3c2412_irq_unmask, - .irq_set_wake = s3c_irq_wake, - .irq_set_type = s3c_irqext_type, + .ack = s3c2412_irq_ack, + .mask = s3c2412_irq_mask, + .unmask = s3c2412_irq_unmask, + .set_wake = s3c_irq_wake, + .set_type = s3c_irqext_type, }; #define INTBIT(x) (1 << ((x) - S3C2410_IRQSUB(0))) @@ -132,29 +132,29 @@ static void s3c2412_irq_demux_cfsdi(unsigned int irq, struct irq_desc *desc) #define INTMSK_CFSDI (1UL << (IRQ_S3C2412_CFSDI - IRQ_EINT0)) #define SUBMSK_CFSDI INTMSK_SUB(IRQ_S3C2412_SDI, IRQ_S3C2412_CF) -static void s3c2412_irq_cfsdi_mask(struct irq_data *data) +static void s3c2412_irq_cfsdi_mask(unsigned int irqno) { - s3c_irqsub_mask(data->irq, INTMSK_CFSDI, SUBMSK_CFSDI); + s3c_irqsub_mask(irqno, INTMSK_CFSDI, SUBMSK_CFSDI); } -static void s3c2412_irq_cfsdi_unmask(struct irq_data *data) +static void s3c2412_irq_cfsdi_unmask(unsigned int irqno) { - s3c_irqsub_unmask(data->irq, INTMSK_CFSDI); + s3c_irqsub_unmask(irqno, INTMSK_CFSDI); } -static void s3c2412_irq_cfsdi_ack(struct irq_data *data) +static void s3c2412_irq_cfsdi_ack(unsigned int irqno) { - s3c_irqsub_maskack(data->irq, INTMSK_CFSDI, SUBMSK_CFSDI); + s3c_irqsub_maskack(irqno, INTMSK_CFSDI, SUBMSK_CFSDI); } static struct irq_chip s3c2412_irq_cfsdi = { .name = "s3c2412-cfsdi", - .irq_ack = s3c2412_irq_cfsdi_ack, - .irq_mask = s3c2412_irq_cfsdi_mask, - .irq_unmask = s3c2412_irq_cfsdi_unmask, + .ack = s3c2412_irq_cfsdi_ack, + .mask = s3c2412_irq_cfsdi_mask, + .unmask = s3c2412_irq_cfsdi_unmask, }; -static int s3c2412_irq_rtc_wake(struct irq_data *data, unsigned int state) +static int s3c2412_irq_rtc_wake(unsigned int irqno, unsigned int state) { unsigned long pwrcfg; @@ -165,7 +165,7 @@ static int s3c2412_irq_rtc_wake(struct irq_data *data, unsigned int state) pwrcfg |= S3C2412_PWRCFG_RTC_MASKIRQ; __raw_writel(pwrcfg, S3C2412_PWRCFG); - return s3c_irq_chip.irq_set_wake(data, state); + return s3c_irq_chip.set_wake(irqno, state); } static struct irq_chip s3c2412_irq_rtc_chip; @@ -193,7 +193,7 @@ static int s3c2412_irq_add(struct sys_device *sysdev) /* change RTC IRQ's set wake method */ s3c2412_irq_rtc_chip = s3c_irq_chip; - s3c2412_irq_rtc_chip.irq_set_wake = s3c2412_irq_rtc_wake; + s3c2412_irq_rtc_chip.set_wake = s3c2412_irq_rtc_wake; set_irq_chip(IRQ_RTC, &s3c2412_irq_rtc_chip); diff --git a/trunk/arch/arm/mach-s3c2416/irq.c b/trunk/arch/arm/mach-s3c2416/irq.c index 680fe386aca5..00174daf1526 100644 --- a/trunk/arch/arm/mach-s3c2416/irq.c +++ b/trunk/arch/arm/mach-s3c2416/irq.c @@ -77,27 +77,28 @@ static void s3c2416_irq_demux_wdtac97(unsigned int irq, struct irq_desc *desc) #define INTMSK_WDTAC97 (1UL << (IRQ_WDT - IRQ_EINT0)) #define SUBMSK_WDTAC97 INTMSK(IRQ_S3C2443_WDT, IRQ_S3C2443_AC97) -static void s3c2416_irq_wdtac97_mask(struct irq_data *data) +static void s3c2416_irq_wdtac97_mask(unsigned int irqno) { - s3c_irqsub_mask(data->irq, INTMSK_WDTAC97, SUBMSK_WDTAC97); + s3c_irqsub_mask(irqno, INTMSK_WDTAC97, SUBMSK_WDTAC97); } -static void s3c2416_irq_wdtac97_unmask(struct irq_data *data) +static void s3c2416_irq_wdtac97_unmask(unsigned int irqno) { - s3c_irqsub_unmask(data->irq, INTMSK_WDTAC97); + s3c_irqsub_unmask(irqno, INTMSK_WDTAC97); } -static void s3c2416_irq_wdtac97_ack(struct irq_data *data) +static void s3c2416_irq_wdtac97_ack(unsigned int irqno) { - s3c_irqsub_maskack(data->irq, INTMSK_WDTAC97, SUBMSK_WDTAC97); + s3c_irqsub_maskack(irqno, INTMSK_WDTAC97, SUBMSK_WDTAC97); } static struct irq_chip s3c2416_irq_wdtac97 = { - .irq_mask = s3c2416_irq_wdtac97_mask, - .irq_unmask = s3c2416_irq_wdtac97_unmask, - .irq_ack = s3c2416_irq_wdtac97_ack, + .mask = s3c2416_irq_wdtac97_mask, + .unmask = s3c2416_irq_wdtac97_unmask, + .ack = s3c2416_irq_wdtac97_ack, }; + /* LCD sub interrupts */ static void s3c2416_irq_demux_lcd(unsigned int irq, struct irq_desc *desc) @@ -108,27 +109,28 @@ static void s3c2416_irq_demux_lcd(unsigned int irq, struct irq_desc *desc) #define INTMSK_LCD (1UL << (IRQ_LCD - IRQ_EINT0)) #define SUBMSK_LCD INTMSK(IRQ_S3C2443_LCD1, IRQ_S3C2443_LCD4) -static void s3c2416_irq_lcd_mask(struct irq_data *data) +static void s3c2416_irq_lcd_mask(unsigned int irqno) { - s3c_irqsub_mask(data->irq, INTMSK_LCD, SUBMSK_LCD); + s3c_irqsub_mask(irqno, INTMSK_LCD, SUBMSK_LCD); } -static void s3c2416_irq_lcd_unmask(struct irq_data *data) +static void s3c2416_irq_lcd_unmask(unsigned int irqno) { - s3c_irqsub_unmask(data->irq, INTMSK_LCD); + s3c_irqsub_unmask(irqno, INTMSK_LCD); } -static void s3c2416_irq_lcd_ack(struct irq_data *data) +static void s3c2416_irq_lcd_ack(unsigned int irqno) { - s3c_irqsub_maskack(data->irq, INTMSK_LCD, SUBMSK_LCD); + s3c_irqsub_maskack(irqno, INTMSK_LCD, SUBMSK_LCD); } static struct irq_chip s3c2416_irq_lcd = { - .irq_mask = s3c2416_irq_lcd_mask, - .irq_unmask = s3c2416_irq_lcd_unmask, - .irq_ack = s3c2416_irq_lcd_ack, + .mask = s3c2416_irq_lcd_mask, + .unmask = s3c2416_irq_lcd_unmask, + .ack = s3c2416_irq_lcd_ack, }; + /* DMA sub interrupts */ static void s3c2416_irq_demux_dma(unsigned int irq, struct irq_desc *desc) @@ -140,27 +142,28 @@ static void s3c2416_irq_demux_dma(unsigned int irq, struct irq_desc *desc) #define SUBMSK_DMA INTMSK(IRQ_S3C2443_DMA0, IRQ_S3C2443_DMA5) -static void s3c2416_irq_dma_mask(struct irq_data *data) +static void s3c2416_irq_dma_mask(unsigned int irqno) { - s3c_irqsub_mask(data->irq, INTMSK_DMA, SUBMSK_DMA); + s3c_irqsub_mask(irqno, INTMSK_DMA, SUBMSK_DMA); } -static void s3c2416_irq_dma_unmask(struct irq_data *data) +static void s3c2416_irq_dma_unmask(unsigned int irqno) { - s3c_irqsub_unmask(data->irq, INTMSK_DMA); + s3c_irqsub_unmask(irqno, INTMSK_DMA); } -static void s3c2416_irq_dma_ack(struct irq_data *data) +static void s3c2416_irq_dma_ack(unsigned int irqno) { - s3c_irqsub_maskack(data->irq, INTMSK_DMA, SUBMSK_DMA); + s3c_irqsub_maskack(irqno, INTMSK_DMA, SUBMSK_DMA); } static struct irq_chip s3c2416_irq_dma = { - .irq_mask = s3c2416_irq_dma_mask, - .irq_unmask = s3c2416_irq_dma_unmask, - .irq_ack = s3c2416_irq_dma_ack, + .mask = s3c2416_irq_dma_mask, + .unmask = s3c2416_irq_dma_unmask, + .ack = s3c2416_irq_dma_ack, }; + /* UART3 sub interrupts */ static void s3c2416_irq_demux_uart3(unsigned int irq, struct irq_desc *desc) @@ -171,27 +174,28 @@ static void s3c2416_irq_demux_uart3(unsigned int irq, struct irq_desc *desc) #define INTMSK_UART3 (1UL << (IRQ_S3C2443_UART3 - IRQ_EINT0)) #define SUBMSK_UART3 (0x7 << (IRQ_S3C2443_RX3 - S3C2410_IRQSUB(0))) -static void s3c2416_irq_uart3_mask(struct irq_data *data) +static void s3c2416_irq_uart3_mask(unsigned int irqno) { - s3c_irqsub_mask(data->irq, INTMSK_UART3, SUBMSK_UART3); + s3c_irqsub_mask(irqno, INTMSK_UART3, SUBMSK_UART3); } -static void s3c2416_irq_uart3_unmask(struct irq_data *data) +static void s3c2416_irq_uart3_unmask(unsigned int irqno) { - s3c_irqsub_unmask(data->irq, INTMSK_UART3); + s3c_irqsub_unmask(irqno, INTMSK_UART3); } -static void s3c2416_irq_uart3_ack(struct irq_data *data) +static void s3c2416_irq_uart3_ack(unsigned int irqno) { - s3c_irqsub_maskack(data->irq, INTMSK_UART3, SUBMSK_UART3); + s3c_irqsub_maskack(irqno, INTMSK_UART3, SUBMSK_UART3); } static struct irq_chip s3c2416_irq_uart3 = { - .irq_mask = s3c2416_irq_uart3_mask, - .irq_unmask = s3c2416_irq_uart3_unmask, - .irq_ack = s3c2416_irq_uart3_ack, + .mask = s3c2416_irq_uart3_mask, + .unmask = s3c2416_irq_uart3_unmask, + .ack = s3c2416_irq_uart3_ack, }; + /* IRQ initialisation code */ static int __init s3c2416_add_sub(unsigned int base, diff --git a/trunk/arch/arm/mach-s3c2440/irq.c b/trunk/arch/arm/mach-s3c2440/irq.c index acad4428bef0..0c049b95c378 100644 --- a/trunk/arch/arm/mach-s3c2440/irq.c +++ b/trunk/arch/arm/mach-s3c2440/irq.c @@ -69,27 +69,27 @@ static void s3c_irq_demux_wdtac97(unsigned int irq, #define INTMSK_WDT (1UL << (IRQ_WDT - IRQ_EINT0)) static void -s3c_irq_wdtac97_mask(struct irq_data *data) +s3c_irq_wdtac97_mask(unsigned int irqno) { - s3c_irqsub_mask(data->irq, INTMSK_WDT, 3 << 13); + s3c_irqsub_mask(irqno, INTMSK_WDT, 3<<13); } static void -s3c_irq_wdtac97_unmask(struct irq_data *data) +s3c_irq_wdtac97_unmask(unsigned int irqno) { - s3c_irqsub_unmask(data->irq, INTMSK_WDT); + s3c_irqsub_unmask(irqno, INTMSK_WDT); } static void -s3c_irq_wdtac97_ack(struct irq_data *data) +s3c_irq_wdtac97_ack(unsigned int irqno) { - s3c_irqsub_maskack(data->irq, INTMSK_WDT, 3 << 13); + s3c_irqsub_maskack(irqno, INTMSK_WDT, 3<<13); } static struct irq_chip s3c_irq_wdtac97 = { - .irq_mask = s3c_irq_wdtac97_mask, - .irq_unmask = s3c_irq_wdtac97_unmask, - .irq_ack = s3c_irq_wdtac97_ack, + .mask = s3c_irq_wdtac97_mask, + .unmask = s3c_irq_wdtac97_unmask, + .ack = s3c_irq_wdtac97_ack, }; static int s3c2440_irq_add(struct sys_device *sysdev) diff --git a/trunk/arch/arm/mach-s3c2440/s3c244x-irq.c b/trunk/arch/arm/mach-s3c2440/s3c244x-irq.c index 83daf4ece764..a75c0c2431ea 100644 --- a/trunk/arch/arm/mach-s3c2440/s3c244x-irq.c +++ b/trunk/arch/arm/mach-s3c2440/s3c244x-irq.c @@ -68,27 +68,27 @@ static void s3c_irq_demux_cam(unsigned int irq, #define INTMSK_CAM (1UL << (IRQ_CAM - IRQ_EINT0)) static void -s3c_irq_cam_mask(struct irq_data *data) +s3c_irq_cam_mask(unsigned int irqno) { - s3c_irqsub_mask(data->irq, INTMSK_CAM, 3 << 11); + s3c_irqsub_mask(irqno, INTMSK_CAM, 3<<11); } static void -s3c_irq_cam_unmask(struct irq_data *data) +s3c_irq_cam_unmask(unsigned int irqno) { - s3c_irqsub_unmask(data->irq, INTMSK_CAM); + s3c_irqsub_unmask(irqno, INTMSK_CAM); } static void -s3c_irq_cam_ack(struct irq_data *data) +s3c_irq_cam_ack(unsigned int irqno) { - s3c_irqsub_maskack(data->irq, INTMSK_CAM, 3 << 11); + s3c_irqsub_maskack(irqno, INTMSK_CAM, 3<<11); } static struct irq_chip s3c_irq_cam = { - .irq_mask = s3c_irq_cam_mask, - .irq_unmask = s3c_irq_cam_unmask, - .irq_ack = s3c_irq_cam_ack, + .mask = s3c_irq_cam_mask, + .unmask = s3c_irq_cam_unmask, + .ack = s3c_irq_cam_ack, }; static int s3c244x_irq_add(struct sys_device *sysdev) diff --git a/trunk/arch/arm/mach-s3c2443/irq.c b/trunk/arch/arm/mach-s3c2443/irq.c index c7820f9c1352..893424767ce1 100644 --- a/trunk/arch/arm/mach-s3c2443/irq.c +++ b/trunk/arch/arm/mach-s3c2443/irq.c @@ -75,27 +75,28 @@ static void s3c2443_irq_demux_wdtac97(unsigned int irq, struct irq_desc *desc) #define INTMSK_WDTAC97 (1UL << (IRQ_WDT - IRQ_EINT0)) #define SUBMSK_WDTAC97 INTMSK(IRQ_S3C2443_WDT, IRQ_S3C2443_AC97) -static void s3c2443_irq_wdtac97_mask(struct irq_data *data) +static void s3c2443_irq_wdtac97_mask(unsigned int irqno) { - s3c_irqsub_mask(data->irq, INTMSK_WDTAC97, SUBMSK_WDTAC97); + s3c_irqsub_mask(irqno, INTMSK_WDTAC97, SUBMSK_WDTAC97); } -static void s3c2443_irq_wdtac97_unmask(struct irq_data *data) +static void s3c2443_irq_wdtac97_unmask(unsigned int irqno) { - s3c_irqsub_unmask(data->irq, INTMSK_WDTAC97); + s3c_irqsub_unmask(irqno, INTMSK_WDTAC97); } -static void s3c2443_irq_wdtac97_ack(struct irq_data *data) +static void s3c2443_irq_wdtac97_ack(unsigned int irqno) { - s3c_irqsub_maskack(data->irq, INTMSK_WDTAC97, SUBMSK_WDTAC97); + s3c_irqsub_maskack(irqno, INTMSK_WDTAC97, SUBMSK_WDTAC97); } static struct irq_chip s3c2443_irq_wdtac97 = { - .irq_mask = s3c2443_irq_wdtac97_mask, - .irq_unmask = s3c2443_irq_wdtac97_unmask, - .irq_ack = s3c2443_irq_wdtac97_ack, + .mask = s3c2443_irq_wdtac97_mask, + .unmask = s3c2443_irq_wdtac97_unmask, + .ack = s3c2443_irq_wdtac97_ack, }; + /* LCD sub interrupts */ static void s3c2443_irq_demux_lcd(unsigned int irq, struct irq_desc *desc) @@ -106,27 +107,28 @@ static void s3c2443_irq_demux_lcd(unsigned int irq, struct irq_desc *desc) #define INTMSK_LCD (1UL << (IRQ_LCD - IRQ_EINT0)) #define SUBMSK_LCD INTMSK(IRQ_S3C2443_LCD1, IRQ_S3C2443_LCD4) -static void s3c2443_irq_lcd_mask(struct irq_data *data) +static void s3c2443_irq_lcd_mask(unsigned int irqno) { - s3c_irqsub_mask(data->irq, INTMSK_LCD, SUBMSK_LCD); + s3c_irqsub_mask(irqno, INTMSK_LCD, SUBMSK_LCD); } -static void s3c2443_irq_lcd_unmask(struct irq_data *data) +static void s3c2443_irq_lcd_unmask(unsigned int irqno) { - s3c_irqsub_unmask(data->irq, INTMSK_LCD); + s3c_irqsub_unmask(irqno, INTMSK_LCD); } -static void s3c2443_irq_lcd_ack(struct irq_data *data) +static void s3c2443_irq_lcd_ack(unsigned int irqno) { - s3c_irqsub_maskack(data->irq, INTMSK_LCD, SUBMSK_LCD); + s3c_irqsub_maskack(irqno, INTMSK_LCD, SUBMSK_LCD); } static struct irq_chip s3c2443_irq_lcd = { - .irq_mask = s3c2443_irq_lcd_mask, - .irq_unmask = s3c2443_irq_lcd_unmask, - .irq_ack = s3c2443_irq_lcd_ack, + .mask = s3c2443_irq_lcd_mask, + .unmask = s3c2443_irq_lcd_unmask, + .ack = s3c2443_irq_lcd_ack, }; + /* DMA sub interrupts */ static void s3c2443_irq_demux_dma(unsigned int irq, struct irq_desc *desc) @@ -137,27 +139,29 @@ static void s3c2443_irq_demux_dma(unsigned int irq, struct irq_desc *desc) #define INTMSK_DMA (1UL << (IRQ_S3C2443_DMA - IRQ_EINT0)) #define SUBMSK_DMA INTMSK(IRQ_S3C2443_DMA0, IRQ_S3C2443_DMA5) -static void s3c2443_irq_dma_mask(struct irq_data *data) + +static void s3c2443_irq_dma_mask(unsigned int irqno) { - s3c_irqsub_mask(data->irq, INTMSK_DMA, SUBMSK_DMA); + s3c_irqsub_mask(irqno, INTMSK_DMA, SUBMSK_DMA); } -static void s3c2443_irq_dma_unmask(struct irq_data *data) +static void s3c2443_irq_dma_unmask(unsigned int irqno) { - s3c_irqsub_unmask(data->irq, INTMSK_DMA); + s3c_irqsub_unmask(irqno, INTMSK_DMA); } -static void s3c2443_irq_dma_ack(struct irq_data *data) +static void s3c2443_irq_dma_ack(unsigned int irqno) { - s3c_irqsub_maskack(data->irq, INTMSK_DMA, SUBMSK_DMA); + s3c_irqsub_maskack(irqno, INTMSK_DMA, SUBMSK_DMA); } static struct irq_chip s3c2443_irq_dma = { - .irq_mask = s3c2443_irq_dma_mask, - .irq_unmask = s3c2443_irq_dma_unmask, - .irq_ack = s3c2443_irq_dma_ack, + .mask = s3c2443_irq_dma_mask, + .unmask = s3c2443_irq_dma_unmask, + .ack = s3c2443_irq_dma_ack, }; + /* UART3 sub interrupts */ static void s3c2443_irq_demux_uart3(unsigned int irq, struct irq_desc *desc) @@ -168,27 +172,28 @@ static void s3c2443_irq_demux_uart3(unsigned int irq, struct irq_desc *desc) #define INTMSK_UART3 (1UL << (IRQ_S3C2443_UART3 - IRQ_EINT0)) #define SUBMSK_UART3 (0x7 << (IRQ_S3C2443_RX3 - S3C2410_IRQSUB(0))) -static void s3c2443_irq_uart3_mask(struct irq_data *data) +static void s3c2443_irq_uart3_mask(unsigned int irqno) { - s3c_irqsub_mask(data->irq, INTMSK_UART3, SUBMSK_UART3); + s3c_irqsub_mask(irqno, INTMSK_UART3, SUBMSK_UART3); } -static void s3c2443_irq_uart3_unmask(struct irq_data *data) +static void s3c2443_irq_uart3_unmask(unsigned int irqno) { - s3c_irqsub_unmask(data->irq, INTMSK_UART3); + s3c_irqsub_unmask(irqno, INTMSK_UART3); } -static void s3c2443_irq_uart3_ack(struct irq_data *data) +static void s3c2443_irq_uart3_ack(unsigned int irqno) { - s3c_irqsub_maskack(data->irq, INTMSK_UART3, SUBMSK_UART3); + s3c_irqsub_maskack(irqno, INTMSK_UART3, SUBMSK_UART3); } static struct irq_chip s3c2443_irq_uart3 = { - .irq_mask = s3c2443_irq_uart3_mask, - .irq_unmask = s3c2443_irq_uart3_unmask, - .irq_ack = s3c2443_irq_uart3_ack, + .mask = s3c2443_irq_uart3_mask, + .unmask = s3c2443_irq_uart3_unmask, + .ack = s3c2443_irq_uart3_ack, }; + /* CAM sub interrupts */ static void s3c2443_irq_demux_cam(unsigned int irq, struct irq_desc *desc) @@ -199,25 +204,25 @@ static void s3c2443_irq_demux_cam(unsigned int irq, struct irq_desc *desc) #define INTMSK_CAM (1UL << (IRQ_CAM - IRQ_EINT0)) #define SUBMSK_CAM INTMSK(IRQ_S3C2440_CAM_C, IRQ_S3C2440_CAM_P) -static void s3c2443_irq_cam_mask(struct irq_data *data) +static void s3c2443_irq_cam_mask(unsigned int irqno) { - s3c_irqsub_mask(data->irq, INTMSK_CAM, SUBMSK_CAM); + s3c_irqsub_mask(irqno, INTMSK_CAM, SUBMSK_CAM); } -static void s3c2443_irq_cam_unmask(struct irq_data *data) +static void s3c2443_irq_cam_unmask(unsigned int irqno) { - s3c_irqsub_unmask(data->irq, INTMSK_CAM); + s3c_irqsub_unmask(irqno, INTMSK_CAM); } -static void s3c2443_irq_cam_ack(struct irq_data *data) +static void s3c2443_irq_cam_ack(unsigned int irqno) { - s3c_irqsub_maskack(data->irq, INTMSK_CAM, SUBMSK_CAM); + s3c_irqsub_maskack(irqno, INTMSK_CAM, SUBMSK_CAM); } static struct irq_chip s3c2443_irq_cam = { - .irq_mask = s3c2443_irq_cam_mask, - .irq_unmask = s3c2443_irq_cam_unmask, - .irq_ack = s3c2443_irq_cam_ack, + .mask = s3c2443_irq_cam_mask, + .unmask = s3c2443_irq_cam_unmask, + .ack = s3c2443_irq_cam_ack, }; /* IRQ initialisation code */ diff --git a/trunk/arch/arm/mach-s3c64xx/clock.c b/trunk/arch/arm/mach-s3c64xx/clock.c index 1c98d2ff2ed6..487dfb95d609 100644 --- a/trunk/arch/arm/mach-s3c64xx/clock.c +++ b/trunk/arch/arm/mach-s3c64xx/clock.c @@ -127,7 +127,7 @@ int s3c64xx_sclk_ctrl(struct clk *clk, int enable) return s3c64xx_gate(S3C_SCLK_GATE, clk, enable); } -static struct clk init_clocks_disable[] = { +static struct clk init_clocks_off[] = { { .name = "nand", .id = -1, @@ -695,7 +695,7 @@ static struct clksrc_clk clksrcs[] = { }, { .clk = { .name = "audio-bus", - .id = 2, + .id = -1, /* There's only one IISv4 port */ .ctrlbit = S3C6410_CLKCON_SCLK_AUDIO2, .enable = s3c64xx_sclk_ctrl, }, @@ -834,10 +834,6 @@ static struct clk *clks[] __initdata = { void __init s3c64xx_register_clocks(unsigned long xtal, unsigned armclk_divlimit) { - struct clk *clkp; - int ret; - int ptr; - armclk_mask = armclk_divlimit; s3c24xx_register_baseclocks(xtal); @@ -845,17 +841,8 @@ void __init s3c64xx_register_clocks(unsigned long xtal, s3c_register_clocks(init_clocks, ARRAY_SIZE(init_clocks)); - clkp = init_clocks_disable; - for (ptr = 0; ptr < ARRAY_SIZE(init_clocks_disable); ptr++, clkp++) { - - ret = s3c24xx_register_clock(clkp); - if (ret < 0) { - printk(KERN_ERR "Failed to register clock %s (%d)\n", - clkp->name, ret); - } - - (clkp->enable)(clkp, 0); - } + s3c_register_clocks(init_clocks_off, ARRAY_SIZE(init_clocks_off)); + s3c_disable_clocks(init_clocks_off, ARRAY_SIZE(init_clocks_off)); s3c24xx_register_clocks(clks1, ARRAY_SIZE(clks1)); s3c_register_clksrc(clksrcs, ARRAY_SIZE(clksrcs)); diff --git a/trunk/arch/arm/mach-s3c64xx/dev-audio.c b/trunk/arch/arm/mach-s3c64xx/dev-audio.c index 7618627b98f5..76426a32c013 100644 --- a/trunk/arch/arm/mach-s3c64xx/dev-audio.c +++ b/trunk/arch/arm/mach-s3c64xx/dev-audio.c @@ -22,12 +22,7 @@ #include #include -static const char *rclksrc[] = { - [0] = "iis", - [1] = "audio-bus", -}; - -static int s3c64xx_i2s_cfg_gpio(struct platform_device *pdev) +static int s3c64xx_i2sv3_cfg_gpio(struct platform_device *pdev) { unsigned int base; @@ -38,12 +33,6 @@ static int s3c64xx_i2s_cfg_gpio(struct platform_device *pdev) case 1: base = S3C64XX_GPE(0); break; - case 2: - s3c_gpio_cfgpin(S3C64XX_GPC(4), S3C_GPIO_SFN(5)); - s3c_gpio_cfgpin(S3C64XX_GPC(5), S3C_GPIO_SFN(5)); - s3c_gpio_cfgpin(S3C64XX_GPC(7), S3C_GPIO_SFN(5)); - s3c_gpio_cfgpin_range(S3C64XX_GPH(6), 4, S3C_GPIO_SFN(5)); - return 0; default: printk(KERN_DEBUG "Invalid I2S Controller number: %d\n", pdev->id); @@ -55,6 +44,16 @@ static int s3c64xx_i2s_cfg_gpio(struct platform_device *pdev) return 0; } +static int s3c64xx_i2sv4_cfg_gpio(struct platform_device *pdev) +{ + s3c_gpio_cfgpin(S3C64XX_GPC(4), S3C_GPIO_SFN(5)); + s3c_gpio_cfgpin(S3C64XX_GPC(5), S3C_GPIO_SFN(5)); + s3c_gpio_cfgpin(S3C64XX_GPC(7), S3C_GPIO_SFN(5)); + s3c_gpio_cfgpin_range(S3C64XX_GPH(6), 4, S3C_GPIO_SFN(5)); + + return 0; +} + static struct resource s3c64xx_iis0_resource[] = { [0] = { .start = S3C64XX_PA_IIS0, @@ -73,22 +72,17 @@ static struct resource s3c64xx_iis0_resource[] = { }, }; -static struct s3c_audio_pdata i2sv3_pdata = { - .cfg_gpio = s3c64xx_i2s_cfg_gpio, - .type = { - .i2s = { - .src_clk = rclksrc, - }, - }, +static struct s3c_audio_pdata s3c_i2s0_pdata = { + .cfg_gpio = s3c64xx_i2sv3_cfg_gpio, }; struct platform_device s3c64xx_device_iis0 = { - .name = "samsung-i2s", + .name = "s3c64xx-iis", .id = 0, .num_resources = ARRAY_SIZE(s3c64xx_iis0_resource), .resource = s3c64xx_iis0_resource, .dev = { - .platform_data = &i2sv3_pdata, + .platform_data = &s3c_i2s0_pdata, }, }; EXPORT_SYMBOL(s3c64xx_device_iis0); @@ -111,13 +105,17 @@ static struct resource s3c64xx_iis1_resource[] = { }, }; +static struct s3c_audio_pdata s3c_i2s1_pdata = { + .cfg_gpio = s3c64xx_i2sv3_cfg_gpio, +}; + struct platform_device s3c64xx_device_iis1 = { - .name = "samsung-i2s", + .name = "s3c64xx-iis", .id = 1, .num_resources = ARRAY_SIZE(s3c64xx_iis1_resource), .resource = s3c64xx_iis1_resource, .dev = { - .platform_data = &i2sv3_pdata, + .platform_data = &s3c_i2s1_pdata, }, }; EXPORT_SYMBOL(s3c64xx_device_iis1); @@ -140,23 +138,17 @@ static struct resource s3c64xx_iisv4_resource[] = { }, }; -static struct s3c_audio_pdata i2sv4_pdata = { - .cfg_gpio = s3c64xx_i2s_cfg_gpio, - .type = { - .i2s = { - .quirks = QUIRK_PRI_6CHAN, - .src_clk = rclksrc, - }, - }, +static struct s3c_audio_pdata s3c_i2sv4_pdata = { + .cfg_gpio = s3c64xx_i2sv4_cfg_gpio, }; struct platform_device s3c64xx_device_iisv4 = { - .name = "samsung-i2s", - .id = 2, + .name = "s3c64xx-iis-v4", + .id = -1, .num_resources = ARRAY_SIZE(s3c64xx_iisv4_resource), .resource = s3c64xx_iisv4_resource, .dev = { - .platform_data = &i2sv4_pdata, + .platform_data = &s3c_i2sv4_pdata, }, }; EXPORT_SYMBOL(s3c64xx_device_iisv4); diff --git a/trunk/arch/arm/mach-s3c64xx/dma.c b/trunk/arch/arm/mach-s3c64xx/dma.c index d9aa072ecee3..e7d03ab41d80 100644 --- a/trunk/arch/arm/mach-s3c64xx/dma.c +++ b/trunk/arch/arm/mach-s3c64xx/dma.c @@ -212,7 +212,6 @@ static int s3c64xx_dma_start(struct s3c2410_dma_chan *chan) config = readl(chan->regs + PL080S_CH_CONFIG); config |= PL080_CONFIG_ENABLE; - config &= ~PL080_CONFIG_HALT; pr_debug("%s: writing config %08x\n", __func__, config); writel(config, chan->regs + PL080S_CH_CONFIG); diff --git a/trunk/arch/arm/mach-s3c64xx/irq-eint.c b/trunk/arch/arm/mach-s3c64xx/irq-eint.c index 2ead8189da74..5682d6a7f4af 100644 --- a/trunk/arch/arm/mach-s3c64xx/irq-eint.c +++ b/trunk/arch/arm/mach-s3c64xx/irq-eint.c @@ -30,41 +30,41 @@ #include #define eint_offset(irq) ((irq) - IRQ_EINT(0)) -#define eint_irq_to_bit(irq) ((u32)(1 << eint_offset(irq))) +#define eint_irq_to_bit(irq) (1 << eint_offset(irq)) -static inline void s3c_irq_eint_mask(struct irq_data *data) +static inline void s3c_irq_eint_mask(unsigned int irq) { u32 mask; mask = __raw_readl(S3C64XX_EINT0MASK); - mask |= (u32)data->chip_data; + mask |= eint_irq_to_bit(irq); __raw_writel(mask, S3C64XX_EINT0MASK); } -static void s3c_irq_eint_unmask(struct irq_data *data) +static void s3c_irq_eint_unmask(unsigned int irq) { u32 mask; mask = __raw_readl(S3C64XX_EINT0MASK); - mask &= ~((u32)data->chip_data); + mask &= ~eint_irq_to_bit(irq); __raw_writel(mask, S3C64XX_EINT0MASK); } -static inline void s3c_irq_eint_ack(struct irq_data *data) +static inline void s3c_irq_eint_ack(unsigned int irq) { - __raw_writel((u32)data->chip_data, S3C64XX_EINT0PEND); + __raw_writel(eint_irq_to_bit(irq), S3C64XX_EINT0PEND); } -static void s3c_irq_eint_maskack(struct irq_data *data) +static void s3c_irq_eint_maskack(unsigned int irq) { /* compiler should in-line these */ - s3c_irq_eint_mask(data); - s3c_irq_eint_ack(data); + s3c_irq_eint_mask(irq); + s3c_irq_eint_ack(irq); } -static int s3c_irq_eint_set_type(struct irq_data *data, unsigned int type) +static int s3c_irq_eint_set_type(unsigned int irq, unsigned int type) { - int offs = eint_offset(data->irq); + int offs = eint_offset(irq); int pin, pin_val; int shift; u32 ctrl, mask; @@ -140,12 +140,12 @@ static int s3c_irq_eint_set_type(struct irq_data *data, unsigned int type) static struct irq_chip s3c_irq_eint = { .name = "s3c-eint", - .irq_mask = s3c_irq_eint_mask, - .irq_unmask = s3c_irq_eint_unmask, - .irq_mask_ack = s3c_irq_eint_maskack, - .irq_ack = s3c_irq_eint_ack, - .irq_set_type = s3c_irq_eint_set_type, - .irq_set_wake = s3c_irqext_wake, + .mask = s3c_irq_eint_mask, + .unmask = s3c_irq_eint_unmask, + .mask_ack = s3c_irq_eint_maskack, + .ack = s3c_irq_eint_ack, + .set_type = s3c_irq_eint_set_type, + .set_wake = s3c_irqext_wake, }; /* s3c_irq_demux_eint @@ -198,7 +198,6 @@ static int __init s3c64xx_init_irq_eint(void) for (irq = IRQ_EINT(0); irq <= IRQ_EINT(27); irq++) { set_irq_chip(irq, &s3c_irq_eint); - set_irq_chip_data(irq, (void *)eint_irq_to_bit(irq)); set_irq_handler(irq, handle_level_irq); set_irq_flags(irq, IRQF_VALID); } diff --git a/trunk/arch/arm/mach-s5p6442/dev-audio.c b/trunk/arch/arm/mach-s5p6442/dev-audio.c index 8719dc41fe32..3462197ff352 100644 --- a/trunk/arch/arm/mach-s5p6442/dev-audio.c +++ b/trunk/arch/arm/mach-s5p6442/dev-audio.c @@ -29,7 +29,7 @@ static int s5p6442_cfg_i2s(struct platform_device *pdev) base = S5P6442_GPC1(0); break; - case 0: + case -1: base = S5P6442_GPC0(0); break; @@ -42,19 +42,8 @@ static int s5p6442_cfg_i2s(struct platform_device *pdev) return 0; } -static const char *rclksrc_v35[] = { - [0] = "busclk", - [1] = "i2sclk", -}; - -static struct s3c_audio_pdata i2sv35_pdata = { +static struct s3c_audio_pdata s3c_i2s_pdata = { .cfg_gpio = s5p6442_cfg_i2s, - .type = { - .i2s = { - .quirks = QUIRK_SEC_DAI | QUIRK_NEED_RSTCLR, - .src_clk = rclksrc_v35, - }, - }, }; static struct resource s5p6442_iis0_resource[] = { @@ -73,34 +62,15 @@ static struct resource s5p6442_iis0_resource[] = { .end = DMACH_I2S0_RX, .flags = IORESOURCE_DMA, }, - [3] = { - .start = DMACH_I2S0S_TX, - .end = DMACH_I2S0S_TX, - .flags = IORESOURCE_DMA, - }, }; struct platform_device s5p6442_device_iis0 = { - .name = "samsung-i2s", - .id = 0, + .name = "s3c64xx-iis-v4", + .id = -1, .num_resources = ARRAY_SIZE(s5p6442_iis0_resource), .resource = s5p6442_iis0_resource, .dev = { - .platform_data = &i2sv35_pdata, - }, -}; - -static const char *rclksrc_v3[] = { - [0] = "iis", - [1] = "sclk_audio", -}; - -static struct s3c_audio_pdata i2sv3_pdata = { - .cfg_gpio = s5p6442_cfg_i2s, - .type = { - .i2s = { - .src_clk = rclksrc_v3, - }, + .platform_data = &s3c_i2s_pdata, }, }; @@ -123,12 +93,12 @@ static struct resource s5p6442_iis1_resource[] = { }; struct platform_device s5p6442_device_iis1 = { - .name = "samsung-i2s", + .name = "s3c64xx-iis", .id = 1, .num_resources = ARRAY_SIZE(s5p6442_iis1_resource), .resource = s5p6442_iis1_resource, .dev = { - .platform_data = &i2sv3_pdata, + .platform_data = &s3c_i2s_pdata, }, }; diff --git a/trunk/arch/arm/mach-s5p6442/include/mach/map.h b/trunk/arch/arm/mach-s5p6442/include/mach/map.h index 203dd5a18bd5..31fb2e68d527 100644 --- a/trunk/arch/arm/mach-s5p6442/include/mach/map.h +++ b/trunk/arch/arm/mach-s5p6442/include/mach/map.h @@ -28,9 +28,6 @@ #define S5P6442_PA_VIC1 (0xE4100000) #define S5P6442_PA_VIC2 (0xE4200000) -#define S5P6442_PA_SROMC (0xE7000000) -#define S5P_PA_SROMC S5P6442_PA_SROMC - #define S5P6442_PA_MDMA 0xE8000000 #define S5P6442_PA_PDMA 0xE9000000 diff --git a/trunk/arch/arm/mach-s5p6442/mach-smdk6442.c b/trunk/arch/arm/mach-s5p6442/mach-smdk6442.c index e69f137b0a39..819fd80d00af 100644 --- a/trunk/arch/arm/mach-s5p6442/mach-smdk6442.c +++ b/trunk/arch/arm/mach-s5p6442/mach-smdk6442.c @@ -12,7 +12,6 @@ #include #include #include -#include #include #include @@ -26,7 +25,6 @@ #include #include #include -#include /* Following are default values for UCON, ULCON and UFCON UART registers */ #define SMDK6442_UCON_DEFAULT (S3C2410_UCON_TXILEVEL | \ @@ -67,15 +65,10 @@ static struct s3c2410_uartcfg smdk6442_uartcfgs[] __initdata = { }; static struct platform_device *smdk6442_devices[] __initdata = { - &s3c_device_i2c0, &s5p6442_device_iis0, &s3c_device_wdt, }; -static struct i2c_board_info smdk6442_i2c_devs0[] __initdata = { - { I2C_BOARD_INFO("wm8580", 0x1b), }, -}; - static void __init smdk6442_map_io(void) { s5p_init_io(NULL, 0, S5P_VA_CHIPID); @@ -85,9 +78,6 @@ static void __init smdk6442_map_io(void) static void __init smdk6442_machine_init(void) { - s3c_i2c0_set_platdata(NULL); - i2c_register_board_info(0, smdk6442_i2c_devs0, - ARRAY_SIZE(smdk6442_i2c_devs0)); platform_add_devices(smdk6442_devices, ARRAY_SIZE(smdk6442_devices)); } diff --git a/trunk/arch/arm/mach-s5p6442/setup-i2c0.c b/trunk/arch/arm/mach-s5p6442/setup-i2c0.c index aad85656b0cc..662695dd7761 100644 --- a/trunk/arch/arm/mach-s5p6442/setup-i2c0.c +++ b/trunk/arch/arm/mach-s5p6442/setup-i2c0.c @@ -14,15 +14,12 @@ #include #include -#include struct platform_device; /* don't need the contents */ -#include #include void s3c_i2c0_cfg_gpio(struct platform_device *dev) { - s3c_gpio_cfgall_range(S5P6442_GPD1(0), 2, - S3C_GPIO_SFN(2), S3C_GPIO_PULL_UP); + /* Will be populated later */ } diff --git a/trunk/arch/arm/mach-s5p64x0/Makefile b/trunk/arch/arm/mach-s5p64x0/Makefile index ae6bf6feba89..2655829e6bf8 100644 --- a/trunk/arch/arm/mach-s5p64x0/Makefile +++ b/trunk/arch/arm/mach-s5p64x0/Makefile @@ -12,9 +12,9 @@ obj- := # Core support for S5P64X0 system -obj-$(CONFIG_ARCH_S5P64X0) += cpu.o init.o clock.o dma.o gpiolib.o +obj-$(CONFIG_ARCH_S5P64X0) += cpu.o init.o clock.o dma.o obj-$(CONFIG_ARCH_S5P64X0) += setup-i2c0.o -obj-$(CONFIG_CPU_S5P6440) += clock-s5p6440.o +obj-$(CONFIG_CPU_S5P6440) += clock-s5p6440.o gpio.o obj-$(CONFIG_CPU_S5P6450) += clock-s5p6450.o # machine support diff --git a/trunk/arch/arm/mach-s5p64x0/clock-s5p6440.c b/trunk/arch/arm/mach-s5p64x0/clock-s5p6440.c index 40137c6f0488..e4883dc1c8d7 100644 --- a/trunk/arch/arm/mach-s5p64x0/clock-s5p6440.c +++ b/trunk/arch/arm/mach-s5p64x0/clock-s5p6440.c @@ -261,7 +261,7 @@ static struct clk init_clocks_disable[] = { .enable = s5p64x0_pclk_ctrl, .ctrlbit = (1 << 25), }, { - .name = "iis", + .name = "i2s_v40", .id = 0, .parent = &clk_pclk_low.clk, .enable = s5p64x0_pclk_ctrl, @@ -419,7 +419,7 @@ static struct clksrc_sources clkset_audio = { static struct clksrc_clk clksrcs[] = { { .clk = { - .name = "sclk_mmc", + .name = "mmc_bus", .id = 0, .ctrlbit = (1 << 24), .enable = s5p64x0_sclk_ctrl, @@ -429,7 +429,7 @@ static struct clksrc_clk clksrcs[] = { .reg_div = { .reg = S5P64X0_CLK_DIV1, .shift = 0, .size = 4 }, }, { .clk = { - .name = "sclk_mmc", + .name = "mmc_bus", .id = 1, .ctrlbit = (1 << 25), .enable = s5p64x0_sclk_ctrl, @@ -439,7 +439,7 @@ static struct clksrc_clk clksrcs[] = { .reg_div = { .reg = S5P64X0_CLK_DIV1, .shift = 4, .size = 4 }, }, { .clk = { - .name = "sclk_mmc", + .name = "mmc_bus", .id = 2, .ctrlbit = (1 << 26), .enable = s5p64x0_sclk_ctrl, diff --git a/trunk/arch/arm/mach-s5p64x0/clock-s5p6450.c b/trunk/arch/arm/mach-s5p64x0/clock-s5p6450.c index 3f5ac93c455e..7dbf3c968f53 100644 --- a/trunk/arch/arm/mach-s5p64x0/clock-s5p6450.c +++ b/trunk/arch/arm/mach-s5p64x0/clock-s5p6450.c @@ -230,12 +230,6 @@ static struct clk init_clocks_disable[] = { .parent = &clk_pclk_low.clk, .enable = s5p64x0_pclk_ctrl, .ctrlbit = (1 << 5), - }, { - .name = "rtc", - .id = -1, - .parent = &clk_pclk_low.clk, - .enable = s5p64x0_pclk_ctrl, - .ctrlbit = (1 << 6), }, { .name = "adc", .id = -1, @@ -262,22 +256,10 @@ static struct clk init_clocks_disable[] = { .ctrlbit = (1 << 22), }, { .name = "iis", - .id = 0, + .id = -1, .parent = &clk_pclk_low.clk, .enable = s5p64x0_pclk_ctrl, .ctrlbit = (1 << 26), - }, { - .name = "iis", - .id = 1, - .parent = &clk_pclk_low.clk, - .enable = s5p64x0_pclk_ctrl, - .ctrlbit = (1 << 15), - }, { - .name = "iis", - .id = 2, - .parent = &clk_pclk_low.clk, - .enable = s5p64x0_pclk_ctrl, - .ctrlbit = (1 << 16), }, { .name = "i2c", .id = 1, diff --git a/trunk/arch/arm/mach-s5p64x0/dev-audio.c b/trunk/arch/arm/mach-s5p64x0/dev-audio.c index 35f1f226dabb..396bacc0a39a 100644 --- a/trunk/arch/arm/mach-s5p64x0/dev-audio.c +++ b/trunk/arch/arm/mach-s5p64x0/dev-audio.c @@ -19,19 +19,15 @@ #include #include -static const char *rclksrc[] = { - [0] = "iis", - [1] = "sclk_audio2", -}; - static int s5p6440_cfg_i2s(struct platform_device *pdev) { + /* configure GPIO for i2s port */ switch (pdev->id) { - case 0: - s3c_gpio_cfgpin_range(S5P6440_GPC(4), 2, S3C_GPIO_SFN(5)); - s3c_gpio_cfgpin(S5P6440_GPC(7), S3C_GPIO_SFN(5)); - s3c_gpio_cfgpin_range(S5P6440_GPH(6), 4, S3C_GPIO_SFN(5)); + case -1: + s3c_gpio_cfgpin_range(S5P6440_GPR(4), 5, S3C_GPIO_SFN(5)); + s3c_gpio_cfgpin_range(S5P6440_GPR(13), 2, S3C_GPIO_SFN(5)); break; + default: printk(KERN_ERR "Invalid Device %d\n", pdev->id); return -EINVAL; @@ -40,58 +36,17 @@ static int s5p6440_cfg_i2s(struct platform_device *pdev) return 0; } -static struct s3c_audio_pdata s5p6440_i2s_pdata = { - .cfg_gpio = s5p6440_cfg_i2s, - .type = { - .i2s = { - .quirks = QUIRK_PRI_6CHAN, - .src_clk = rclksrc, - }, - }, -}; - -static struct resource s5p64x0_i2s0_resource[] = { - [0] = { - .start = S5P64X0_PA_I2S, - .end = S5P64X0_PA_I2S + 0x100 - 1, - .flags = IORESOURCE_MEM, - }, - [1] = { - .start = DMACH_I2S0_TX, - .end = DMACH_I2S0_TX, - .flags = IORESOURCE_DMA, - }, - [2] = { - .start = DMACH_I2S0_RX, - .end = DMACH_I2S0_RX, - .flags = IORESOURCE_DMA, - }, -}; - -struct platform_device s5p6440_device_iis = { - .name = "samsung-i2s", - .id = 0, - .num_resources = ARRAY_SIZE(s5p64x0_i2s0_resource), - .resource = s5p64x0_i2s0_resource, - .dev = { - .platform_data = &s5p6440_i2s_pdata, - }, -}; - static int s5p6450_cfg_i2s(struct platform_device *pdev) { + /* configure GPIO for i2s port */ switch (pdev->id) { - case 0: + case -1: + s3c_gpio_cfgpin(S5P6450_GPB(4), S3C_GPIO_SFN(5)); s3c_gpio_cfgpin_range(S5P6450_GPR(4), 5, S3C_GPIO_SFN(5)); s3c_gpio_cfgpin_range(S5P6450_GPR(13), 2, S3C_GPIO_SFN(5)); + break; - case 1: - s3c_gpio_cfgpin(S5P6440_GPB(4), S3C_GPIO_SFN(5)); - s3c_gpio_cfgpin_range(S5P6450_GPC(0), 4, S3C_GPIO_SFN(5)); - break; - case 2: - s3c_gpio_cfgpin_range(S5P6450_GPK(0), 5, S3C_GPIO_SFN(5)); - break; + default: printk(KERN_ERR "Invalid Device %d\n", pdev->id); return -EINVAL; @@ -100,86 +55,47 @@ static int s5p6450_cfg_i2s(struct platform_device *pdev) return 0; } -static struct s3c_audio_pdata s5p6450_i2s0_pdata = { - .cfg_gpio = s5p6450_cfg_i2s, - .type = { - .i2s = { - .quirks = QUIRK_PRI_6CHAN, - .src_clk = rclksrc, - }, - }, -}; - -struct platform_device s5p6450_device_iis0 = { - .name = "samsung-i2s", - .id = 0, - .num_resources = ARRAY_SIZE(s5p64x0_i2s0_resource), - .resource = s5p64x0_i2s0_resource, - .dev = { - .platform_data = &s5p6450_i2s0_pdata, - }, +static struct s3c_audio_pdata s5p6440_i2s_pdata = { + .cfg_gpio = s5p6440_cfg_i2s, }; static struct s3c_audio_pdata s5p6450_i2s_pdata = { .cfg_gpio = s5p6450_cfg_i2s, - .type = { - .i2s = { - .src_clk = rclksrc, - }, - }, }; -static struct resource s5p6450_i2s1_resource[] = { +static struct resource s5p64x0_iis0_resource[] = { [0] = { - .start = S5P6450_PA_I2S1, - .end = S5P6450_PA_I2S1 + 0x100 - 1, + .start = S5P64X0_PA_I2S, + .end = S5P64X0_PA_I2S + 0x100 - 1, .flags = IORESOURCE_MEM, }, [1] = { - .start = DMACH_I2S1_TX, - .end = DMACH_I2S1_TX, + .start = DMACH_I2S0_TX, + .end = DMACH_I2S0_TX, .flags = IORESOURCE_DMA, }, [2] = { - .start = DMACH_I2S1_RX, - .end = DMACH_I2S1_RX, + .start = DMACH_I2S0_RX, + .end = DMACH_I2S0_RX, .flags = IORESOURCE_DMA, }, }; -struct platform_device s5p6450_device_iis1 = { - .name = "samsung-i2s", - .id = 1, - .num_resources = ARRAY_SIZE(s5p6450_i2s1_resource), - .resource = s5p6450_i2s1_resource, +struct platform_device s5p6440_device_iis = { + .name = "s3c64xx-iis-v4", + .id = -1, + .num_resources = ARRAY_SIZE(s5p64x0_iis0_resource), + .resource = s5p64x0_iis0_resource, .dev = { - .platform_data = &s5p6450_i2s_pdata, - }, -}; - -static struct resource s5p6450_i2s2_resource[] = { - [0] = { - .start = S5P6450_PA_I2S2, - .end = S5P6450_PA_I2S2 + 0x100 - 1, - .flags = IORESOURCE_MEM, - }, - [1] = { - .start = DMACH_I2S2_TX, - .end = DMACH_I2S2_TX, - .flags = IORESOURCE_DMA, - }, - [2] = { - .start = DMACH_I2S2_RX, - .end = DMACH_I2S2_RX, - .flags = IORESOURCE_DMA, + .platform_data = &s5p6440_i2s_pdata, }, }; -struct platform_device s5p6450_device_iis2 = { - .name = "samsung-i2s", - .id = 2, - .num_resources = ARRAY_SIZE(s5p6450_i2s2_resource), - .resource = s5p6450_i2s2_resource, +struct platform_device s5p6450_device_iis0 = { + .name = "s3c64xx-iis-v4", + .id = -1, + .num_resources = ARRAY_SIZE(s5p64x0_iis0_resource), + .resource = s5p64x0_iis0_resource, .dev = { .platform_data = &s5p6450_i2s_pdata, }, diff --git a/trunk/arch/arm/mach-s5p64x0/gpiolib.c b/trunk/arch/arm/mach-s5p64x0/gpio.c similarity index 58% rename from trunk/arch/arm/mach-s5p64x0/gpiolib.c rename to trunk/arch/arm/mach-s5p64x0/gpio.c index e7fb3b004e77..39159dd5a29a 100644 --- a/trunk/arch/arm/mach-s5p64x0/gpiolib.c +++ b/trunk/arch/arm/mach-s5p64x0/gpio.c @@ -1,4 +1,4 @@ -/* linux/arch/arm/mach-s5p64x0/gpiolib.c +/* linux/arch/arm/mach-s5p64x0/gpio.c * * Copyright (c) 2009-2010 Samsung Electronics Co., Ltd. * http://www.samsung.com @@ -17,12 +17,13 @@ #include #include -#include #include #include #include +/* To be implemented S5P6450 GPIO */ + /* * S5P6440 GPIO bank summary: * @@ -39,25 +40,6 @@ * P 8 2Bit Yes 8 * R 15 4Bit[2] Yes 8 * - * S5P6450 GPIO bank summary: - * - * Bank GPIOs Style SlpCon ExtInt Group - * A 6 4Bit Yes 1 - * B 7 4Bit Yes 1 - * C 8 4Bit Yes 2 - * D 8 4Bit Yes None - * F 2 2Bit Yes None - * G 14 4Bit[2] Yes 5 - * H 10 4Bit[2] Yes 6 - * I 16 2Bit Yes None - * J 12 2Bit Yes None - * K 5 4Bit Yes None - * N 16 2Bit No IRQ_EINT - * P 11 2Bit Yes 8 - * Q 14 2Bit Yes None - * R 15 4Bit[2] Yes None - * S 8 2Bit Yes None - * * [1] BANKF pins 14,15 do not form part of the external interrupt sources * [2] BANK has two control registers, GPxCON0 and GPxCON1 */ @@ -208,7 +190,7 @@ static struct s3c_gpio_cfg s5p64x0_gpio_cfgs[] = { static struct s3c_gpio_chip s5p6440_gpio_4bit[] = { { - .base = S5P64X0_GPA_BASE, + .base = S5P6440_GPA_BASE, .config = &s5p64x0_gpio_cfgs[1], .chip = { .base = S5P6440_GPA(0), @@ -216,7 +198,7 @@ static struct s3c_gpio_chip s5p6440_gpio_4bit[] = { .label = "GPA", }, }, { - .base = S5P64X0_GPB_BASE, + .base = S5P6440_GPB_BASE, .config = &s5p64x0_gpio_cfgs[1], .chip = { .base = S5P6440_GPB(0), @@ -224,7 +206,7 @@ static struct s3c_gpio_chip s5p6440_gpio_4bit[] = { .label = "GPB", }, }, { - .base = S5P64X0_GPC_BASE, + .base = S5P6440_GPC_BASE, .config = &s5p64x0_gpio_cfgs[1], .chip = { .base = S5P6440_GPC(0), @@ -232,7 +214,7 @@ static struct s3c_gpio_chip s5p6440_gpio_4bit[] = { .label = "GPC", }, }, { - .base = S5P64X0_GPG_BASE, + .base = S5P6440_GPG_BASE, .config = &s5p64x0_gpio_cfgs[1], .chip = { .base = S5P6440_GPG(0), @@ -244,7 +226,7 @@ static struct s3c_gpio_chip s5p6440_gpio_4bit[] = { static struct s3c_gpio_chip s5p6440_gpio_4bit2[] = { { - .base = S5P64X0_GPH_BASE + 0x4, + .base = S5P6440_GPH_BASE + 0x4, .config = &s5p64x0_gpio_cfgs[1], .chip = { .base = S5P6440_GPH(0), @@ -256,7 +238,7 @@ static struct s3c_gpio_chip s5p6440_gpio_4bit2[] = { static struct s3c_gpio_chip s5p6440_gpio_rbank_4bit2[] = { { - .base = S5P64X0_GPR_BASE + 0x4, + .base = S5P6440_GPR_BASE + 0x4, .config = &s5p64x0_gpio_cfgs[2], .chip = { .base = S5P6440_GPR(0), @@ -268,7 +250,7 @@ static struct s3c_gpio_chip s5p6440_gpio_rbank_4bit2[] = { static struct s3c_gpio_chip s5p6440_gpio_2bit[] = { { - .base = S5P64X0_GPF_BASE, + .base = S5P6440_GPF_BASE, .config = &s5p64x0_gpio_cfgs[5], .chip = { .base = S5P6440_GPF(0), @@ -276,7 +258,7 @@ static struct s3c_gpio_chip s5p6440_gpio_2bit[] = { .label = "GPF", }, }, { - .base = S5P64X0_GPI_BASE, + .base = S5P6440_GPI_BASE, .config = &s5p64x0_gpio_cfgs[3], .chip = { .base = S5P6440_GPI(0), @@ -284,7 +266,7 @@ static struct s3c_gpio_chip s5p6440_gpio_2bit[] = { .label = "GPI", }, }, { - .base = S5P64X0_GPJ_BASE, + .base = S5P6440_GPJ_BASE, .config = &s5p64x0_gpio_cfgs[3], .chip = { .base = S5P6440_GPJ(0), @@ -292,7 +274,7 @@ static struct s3c_gpio_chip s5p6440_gpio_2bit[] = { .label = "GPJ", }, }, { - .base = S5P64X0_GPN_BASE, + .base = S5P6440_GPN_BASE, .config = &s5p64x0_gpio_cfgs[4], .chip = { .base = S5P6440_GPN(0), @@ -300,7 +282,7 @@ static struct s3c_gpio_chip s5p6440_gpio_2bit[] = { .label = "GPN", }, }, { - .base = S5P64X0_GPP_BASE, + .base = S5P6440_GPP_BASE, .config = &s5p64x0_gpio_cfgs[5], .chip = { .base = S5P6440_GPP(0), @@ -310,142 +292,6 @@ static struct s3c_gpio_chip s5p6440_gpio_2bit[] = { }, }; -static struct s3c_gpio_chip s5p6450_gpio_4bit[] = { - { - .base = S5P64X0_GPA_BASE, - .config = &s5p64x0_gpio_cfgs[1], - .chip = { - .base = S5P6450_GPA(0), - .ngpio = S5P6450_GPIO_A_NR, - .label = "GPA", - }, - }, { - .base = S5P64X0_GPB_BASE, - .config = &s5p64x0_gpio_cfgs[1], - .chip = { - .base = S5P6450_GPB(0), - .ngpio = S5P6450_GPIO_B_NR, - .label = "GPB", - }, - }, { - .base = S5P64X0_GPC_BASE, - .config = &s5p64x0_gpio_cfgs[1], - .chip = { - .base = S5P6450_GPC(0), - .ngpio = S5P6450_GPIO_C_NR, - .label = "GPC", - }, - }, { - .base = S5P6450_GPD_BASE, - .config = &s5p64x0_gpio_cfgs[1], - .chip = { - .base = S5P6450_GPD(0), - .ngpio = S5P6450_GPIO_D_NR, - .label = "GPD", - }, - }, { - .base = S5P6450_GPK_BASE, - .config = &s5p64x0_gpio_cfgs[1], - .chip = { - .base = S5P6450_GPK(0), - .ngpio = S5P6450_GPIO_K_NR, - .label = "GPK", - }, - }, -}; - -static struct s3c_gpio_chip s5p6450_gpio_4bit2[] = { - { - .base = S5P64X0_GPG_BASE + 0x4, - .config = &s5p64x0_gpio_cfgs[1], - .chip = { - .base = S5P6450_GPG(0), - .ngpio = S5P6450_GPIO_G_NR, - .label = "GPG", - }, - }, { - .base = S5P64X0_GPH_BASE + 0x4, - .config = &s5p64x0_gpio_cfgs[1], - .chip = { - .base = S5P6450_GPH(0), - .ngpio = S5P6450_GPIO_H_NR, - .label = "GPH", - }, - }, -}; - -static struct s3c_gpio_chip s5p6450_gpio_rbank_4bit2[] = { - { - .base = S5P64X0_GPR_BASE + 0x4, - .config = &s5p64x0_gpio_cfgs[2], - .chip = { - .base = S5P6450_GPR(0), - .ngpio = S5P6450_GPIO_R_NR, - .label = "GPR", - }, - }, -}; - -static struct s3c_gpio_chip s5p6450_gpio_2bit[] = { - { - .base = S5P64X0_GPF_BASE, - .config = &s5p64x0_gpio_cfgs[5], - .chip = { - .base = S5P6450_GPF(0), - .ngpio = S5P6450_GPIO_F_NR, - .label = "GPF", - }, - }, { - .base = S5P64X0_GPI_BASE, - .config = &s5p64x0_gpio_cfgs[3], - .chip = { - .base = S5P6450_GPI(0), - .ngpio = S5P6450_GPIO_I_NR, - .label = "GPI", - }, - }, { - .base = S5P64X0_GPJ_BASE, - .config = &s5p64x0_gpio_cfgs[3], - .chip = { - .base = S5P6450_GPJ(0), - .ngpio = S5P6450_GPIO_J_NR, - .label = "GPJ", - }, - }, { - .base = S5P64X0_GPN_BASE, - .config = &s5p64x0_gpio_cfgs[4], - .chip = { - .base = S5P6450_GPN(0), - .ngpio = S5P6450_GPIO_N_NR, - .label = "GPN", - }, - }, { - .base = S5P64X0_GPP_BASE, - .config = &s5p64x0_gpio_cfgs[5], - .chip = { - .base = S5P6450_GPP(0), - .ngpio = S5P6450_GPIO_P_NR, - .label = "GPP", - }, - }, { - .base = S5P6450_GPQ_BASE, - .config = &s5p64x0_gpio_cfgs[4], - .chip = { - .base = S5P6450_GPQ(0), - .ngpio = S5P6450_GPIO_Q_NR, - .label = "GPQ", - }, - }, { - .base = S5P6450_GPS_BASE, - .config = &s5p64x0_gpio_cfgs[5], - .chip = { - .base = S5P6450_GPS(0), - .ngpio = S5P6450_GPIO_S_NR, - .label = "GPS", - }, - }, -}; - void __init s5p64x0_gpiolib_set_cfg(struct s3c_gpio_cfg *chipcfg, int nr_chips) { for (; nr_chips > 0; nr_chips--, chipcfg++) { @@ -471,41 +317,26 @@ static void __init s5p64x0_gpio_add_rbank_4bit2(struct s3c_gpio_chip *chip, } } -static int __init s5p64x0_gpiolib_init(void) +static int __init s5p6440_gpiolib_init(void) { - unsigned int chipid; - - chipid = __raw_readl(S5P64X0_SYS_ID); + struct s3c_gpio_chip *chips = s5p6440_gpio_2bit; + int nr_chips = ARRAY_SIZE(s5p6440_gpio_2bit); s5p64x0_gpiolib_set_cfg(s5p64x0_gpio_cfgs, ARRAY_SIZE(s5p64x0_gpio_cfgs)); - if ((chipid & 0xff000) == 0x50000) { - samsung_gpiolib_add_2bit_chips(s5p6450_gpio_2bit, - ARRAY_SIZE(s5p6450_gpio_2bit)); - - samsung_gpiolib_add_4bit_chips(s5p6450_gpio_4bit, - ARRAY_SIZE(s5p6450_gpio_4bit)); + for (; nr_chips > 0; nr_chips--, chips++) + s3c_gpiolib_add(chips); - samsung_gpiolib_add_4bit2_chips(s5p6450_gpio_4bit2, - ARRAY_SIZE(s5p6450_gpio_4bit2)); + samsung_gpiolib_add_4bit_chips(s5p6440_gpio_4bit, + ARRAY_SIZE(s5p6440_gpio_4bit)); - s5p64x0_gpio_add_rbank_4bit2(s5p6450_gpio_rbank_4bit2, - ARRAY_SIZE(s5p6450_gpio_rbank_4bit2)); - } else { - samsung_gpiolib_add_2bit_chips(s5p6440_gpio_2bit, - ARRAY_SIZE(s5p6440_gpio_2bit)); + samsung_gpiolib_add_4bit2_chips(s5p6440_gpio_4bit2, + ARRAY_SIZE(s5p6440_gpio_4bit2)); - samsung_gpiolib_add_4bit_chips(s5p6440_gpio_4bit, - ARRAY_SIZE(s5p6440_gpio_4bit)); - - samsung_gpiolib_add_4bit2_chips(s5p6440_gpio_4bit2, - ARRAY_SIZE(s5p6440_gpio_4bit2)); - - s5p64x0_gpio_add_rbank_4bit2(s5p6440_gpio_rbank_4bit2, - ARRAY_SIZE(s5p6440_gpio_rbank_4bit2)); - } + s5p64x0_gpio_add_rbank_4bit2(s5p6440_gpio_rbank_4bit2, + ARRAY_SIZE(s5p6440_gpio_rbank_4bit2)); return 0; } -core_initcall(s5p64x0_gpiolib_init); +arch_initcall(s5p6440_gpiolib_init); diff --git a/trunk/arch/arm/mach-s5p64x0/include/mach/map.h b/trunk/arch/arm/mach-s5p64x0/include/mach/map.h index a9365e5ba614..31e534156e06 100644 --- a/trunk/arch/arm/mach-s5p64x0/include/mach/map.h +++ b/trunk/arch/arm/mach-s5p64x0/include/mach/map.h @@ -29,9 +29,6 @@ #define S5P64X0_PA_VIC0 (0xE4000000) #define S5P64X0_PA_VIC1 (0xE4100000) -#define S5P64X0_PA_SROMC (0xE7000000) -#define S5P_PA_SROMC S5P64X0_PA_SROMC - #define S5P64X0_PA_PDMA (0xE9000000) #define S5P64X0_PA_TIMER (0xEA000000) @@ -66,8 +63,6 @@ #define S5P64X0_PA_HSMMC(x) (0xED800000 + ((x) * 0x100000)) #define S5P64X0_PA_I2S (0xF2000000) -#define S5P6450_PA_I2S1 0xF2800000 -#define S5P6450_PA_I2S2 0xF2900000 #define S5P64X0_PA_PCM (0xF2100000) diff --git a/trunk/arch/arm/mach-s5p64x0/include/mach/regs-gpio.h b/trunk/arch/arm/mach-s5p64x0/include/mach/regs-gpio.h index 0953ef6b1c77..85f448e20a8b 100644 --- a/trunk/arch/arm/mach-s5p64x0/include/mach/regs-gpio.h +++ b/trunk/arch/arm/mach-s5p64x0/include/mach/regs-gpio.h @@ -15,23 +15,48 @@ #include +/* Will be implemented S5P6442 GPIOlib */ + /* Base addresses for each of the banks */ -#define S5P64X0_GPA_BASE (S5P_VA_GPIO + 0x0000) -#define S5P64X0_GPB_BASE (S5P_VA_GPIO + 0x0020) -#define S5P64X0_GPC_BASE (S5P_VA_GPIO + 0x0040) -#define S5P64X0_GPF_BASE (S5P_VA_GPIO + 0x00A0) -#define S5P64X0_GPG_BASE (S5P_VA_GPIO + 0x00C0) -#define S5P64X0_GPH_BASE (S5P_VA_GPIO + 0x00E0) -#define S5P64X0_GPI_BASE (S5P_VA_GPIO + 0x0100) -#define S5P64X0_GPJ_BASE (S5P_VA_GPIO + 0x0120) -#define S5P64X0_GPN_BASE (S5P_VA_GPIO + 0x0830) -#define S5P64X0_GPP_BASE (S5P_VA_GPIO + 0x0160) -#define S5P64X0_GPR_BASE (S5P_VA_GPIO + 0x0290) - -#define S5P6450_GPD_BASE (S5P_VA_GPIO + 0x0060) -#define S5P6450_GPK_BASE (S5P_VA_GPIO + 0x0140) -#define S5P6450_GPQ_BASE (S5P_VA_GPIO + 0x0180) -#define S5P6450_GPS_BASE (S5P_VA_GPIO + 0x0300) +#define S5P6440_GPA_BASE (S5P_VA_GPIO + 0x0000) +#define S5P6440_GPB_BASE (S5P_VA_GPIO + 0x0020) +#define S5P6440_GPC_BASE (S5P_VA_GPIO + 0x0040) +#define S5P6440_GPF_BASE (S5P_VA_GPIO + 0x00A0) +#define S5P6440_GPG_BASE (S5P_VA_GPIO + 0x00C0) +#define S5P6440_GPH_BASE (S5P_VA_GPIO + 0x00E0) +#define S5P6440_GPI_BASE (S5P_VA_GPIO + 0x0100) +#define S5P6440_GPJ_BASE (S5P_VA_GPIO + 0x0120) +#define S5P6440_GPN_BASE (S5P_VA_GPIO + 0x0830) +#define S5P6440_GPP_BASE (S5P_VA_GPIO + 0x0160) +#define S5P6440_GPR_BASE (S5P_VA_GPIO + 0x0290) + +#define S5P6440_EINT0CON0 (S5P_VA_GPIO + 0x900) +#define S5P6440_EINT0FLTCON0 (S5P_VA_GPIO + 0x910) +#define S5P6440_EINT0FLTCON1 (S5P_VA_GPIO + 0x914) +#define S5P6440_EINT0MASK (S5P_VA_GPIO + 0x920) +#define S5P6440_EINT0PEND (S5P_VA_GPIO + 0x924) + +/* for LCD */ + +#define S5P6440_SPCON_LCD_SEL_RGB (1 << 0) +#define S5P6440_SPCON_LCD_SEL_MASK (3 << 0) + +/* + * These set of macros are not really useful for the + * GPF/GPI/GPJ/GPN/GPP, useful for others set of GPIO's (4 bit) + */ + +#define S5P6440_GPIO_CONMASK(__gpio) (0xf << ((__gpio) * 4)) +#define S5P6440_GPIO_INPUT(__gpio) (0x0 << ((__gpio) * 4)) +#define S5P6440_GPIO_OUTPUT(__gpio) (0x1 << ((__gpio) * 4)) + +/* + * Use these macros for GPF/GPI/GPJ/GPN/GPP set of GPIO (2 bit) + */ + +#define S5P6440_GPIO2_CONMASK(__gpio) (0x3 << ((__gpio) * 2)) +#define S5P6440_GPIO2_INPUT(__gpio) (0x0 << ((__gpio) * 2)) +#define S5P6440_GPIO2_OUTPUT(__gpio) (0x1 << ((__gpio) * 2)) #endif /* __ASM_ARCH_REGS_GPIO_H */ diff --git a/trunk/arch/arm/mach-s5p64x0/mach-smdk6440.c b/trunk/arch/arm/mach-s5p64x0/mach-smdk6440.c index e9802755daeb..87c3f03c618c 100644 --- a/trunk/arch/arm/mach-s5p64x0/mach-smdk6440.c +++ b/trunk/arch/arm/mach-s5p64x0/mach-smdk6440.c @@ -117,7 +117,6 @@ static struct s3c2410_platform_i2c s5p6440_i2c1_data __initdata = { static struct i2c_board_info smdk6440_i2c_devs0[] __initdata = { { I2C_BOARD_INFO("24c08", 0x50), }, - { I2C_BOARD_INFO("wm8580", 0x1b), }, }; static struct i2c_board_info smdk6440_i2c_devs1[] __initdata = { diff --git a/trunk/arch/arm/mach-s5p64x0/mach-smdk6450.c b/trunk/arch/arm/mach-s5p64x0/mach-smdk6450.c index b78f56292780..d609f5af2b98 100644 --- a/trunk/arch/arm/mach-s5p64x0/mach-smdk6450.c +++ b/trunk/arch/arm/mach-s5p64x0/mach-smdk6450.c @@ -135,7 +135,6 @@ static struct s3c2410_platform_i2c s5p6450_i2c1_data __initdata = { }; static struct i2c_board_info smdk6450_i2c_devs0[] __initdata = { - { I2C_BOARD_INFO("wm8580", 0x1b), }, { I2C_BOARD_INFO("24c08", 0x50), }, /* Samsung KS24C080C EEPROM */ }; diff --git a/trunk/arch/arm/mach-s5pc100/dev-audio.c b/trunk/arch/arm/mach-s5pc100/dev-audio.c index 10ab275ebd63..564e195ec493 100644 --- a/trunk/arch/arm/mach-s5pc100/dev-audio.c +++ b/trunk/arch/arm/mach-s5pc100/dev-audio.c @@ -23,14 +23,17 @@ static int s5pc100_cfg_i2s(struct platform_device *pdev) { /* configure GPIO for i2s port */ switch (pdev->id) { - case 0: /* Dedicated pins */ - break; case 1: s3c_gpio_cfgpin_range(S5PC100_GPC(0), 5, S3C_GPIO_SFN(2)); break; + case 2: s3c_gpio_cfgpin_range(S5PC100_GPG3(0), 5, S3C_GPIO_SFN(4)); break; + + case -1: /* Dedicated pins */ + break; + default: printk(KERN_ERR "Invalid Device %d\n", pdev->id); return -EINVAL; @@ -39,20 +42,8 @@ static int s5pc100_cfg_i2s(struct platform_device *pdev) return 0; } -static const char *rclksrc_v5[] = { - [0] = "iis", - [1] = "i2sclkd2", -}; - -static struct s3c_audio_pdata i2sv5_pdata = { +static struct s3c_audio_pdata s3c_i2s_pdata = { .cfg_gpio = s5pc100_cfg_i2s, - .type = { - .i2s = { - .quirks = QUIRK_PRI_6CHAN | QUIRK_SEC_DAI - | QUIRK_NEED_RSTCLR, - .src_clk = rclksrc_v5, - }, - }, }; static struct resource s5pc100_iis0_resource[] = { @@ -71,34 +62,15 @@ static struct resource s5pc100_iis0_resource[] = { .end = DMACH_I2S0_RX, .flags = IORESOURCE_DMA, }, - [3] = { - .start = DMACH_I2S0S_TX, - .end = DMACH_I2S0S_TX, - .flags = IORESOURCE_DMA, - }, }; struct platform_device s5pc100_device_iis0 = { - .name = "samsung-i2s", - .id = 0, + .name = "s3c64xx-iis-v4", + .id = -1, .num_resources = ARRAY_SIZE(s5pc100_iis0_resource), .resource = s5pc100_iis0_resource, .dev = { - .platform_data = &i2sv5_pdata, - }, -}; - -static const char *rclksrc_v3[] = { - [0] = "iis", - [1] = "sclk_audio", -}; - -static struct s3c_audio_pdata i2sv3_pdata = { - .cfg_gpio = s5pc100_cfg_i2s, - .type = { - .i2s = { - .src_clk = rclksrc_v3, - }, + .platform_data = &s3c_i2s_pdata, }, }; @@ -121,12 +93,12 @@ static struct resource s5pc100_iis1_resource[] = { }; struct platform_device s5pc100_device_iis1 = { - .name = "samsung-i2s", + .name = "s3c64xx-iis", .id = 1, .num_resources = ARRAY_SIZE(s5pc100_iis1_resource), .resource = s5pc100_iis1_resource, .dev = { - .platform_data = &i2sv3_pdata, + .platform_data = &s3c_i2s_pdata, }, }; @@ -149,12 +121,12 @@ static struct resource s5pc100_iis2_resource[] = { }; struct platform_device s5pc100_device_iis2 = { - .name = "samsung-i2s", + .name = "s3c64xx-iis", .id = 2, .num_resources = ARRAY_SIZE(s5pc100_iis2_resource), .resource = s5pc100_iis2_resource, .dev = { - .platform_data = &i2sv3_pdata, + .platform_data = &s3c_i2s_pdata, }, }; diff --git a/trunk/arch/arm/mach-s5pc100/include/mach/map.h b/trunk/arch/arm/mach-s5pc100/include/mach/map.h index 328467b346aa..32e9cab5c864 100644 --- a/trunk/arch/arm/mach-s5pc100/include/mach/map.h +++ b/trunk/arch/arm/mach-s5pc100/include/mach/map.h @@ -55,8 +55,6 @@ #define S5PC100_VA_VIC_OFFSET 0x10000 #define S5PC1XX_VA_VIC(x) (S5PC100_VA_VIC + ((x) * S5PC100_VA_VIC_OFFSET)) -#define S5PC100_PA_SROMC (0xE7000000) -#define S5P_PA_SROMC S5PC100_PA_SROMC #define S5PC100_PA_ONENAND (0xE7100000) diff --git a/trunk/arch/arm/mach-s5pv210/Kconfig b/trunk/arch/arm/mach-s5pv210/Kconfig index 53aabef1e9ce..862f239a0fdb 100644 --- a/trunk/arch/arm/mach-s5pv210/Kconfig +++ b/trunk/arch/arm/mach-s5pv210/Kconfig @@ -118,7 +118,6 @@ menu "S5PV210 Machines" config MACH_SMDKV210 bool "SMDKV210" select CPU_S5PV210 - select S3C_DEV_FB select S3C_DEV_HSMMC select S3C_DEV_HSMMC1 select S3C_DEV_HSMMC2 @@ -131,7 +130,6 @@ config MACH_SMDKV210 select SAMSUNG_DEV_IDE select SAMSUNG_DEV_KEYPAD select SAMSUNG_DEV_TS - select S5PV210_SETUP_FB_24BPP select S5PV210_SETUP_I2C1 select S5PV210_SETUP_I2C2 select S5PV210_SETUP_IDE diff --git a/trunk/arch/arm/mach-s5pv210/clock.c b/trunk/arch/arm/mach-s5pv210/clock.c index dab6ef3b6ca9..019c3a69b0e4 100644 --- a/trunk/arch/arm/mach-s5pv210/clock.c +++ b/trunk/arch/arm/mach-s5pv210/clock.c @@ -467,20 +467,20 @@ static struct clk init_clocks_disable[] = { .enable = s5pv210_clk_ip3_ctrl, .ctrlbit = (1<<21), }, { - .name = "iis", + .name = "i2s_v50", .id = 0, .parent = &clk_p, .enable = s5pv210_clk_ip3_ctrl, .ctrlbit = (1<<4), }, { - .name = "iis", - .id = 1, + .name = "i2s_v32", + .id = 0, .parent = &clk_p, .enable = s5pv210_clk_ip3_ctrl, .ctrlbit = (1 << 5), }, { - .name = "iis", - .id = 2, + .name = "i2s_v32", + .id = 1, .parent = &clk_p, .enable = s5pv210_clk_ip3_ctrl, .ctrlbit = (1 << 6), @@ -525,12 +525,6 @@ static struct clk init_clocks[] = { .parent = &clk_pclk_psys.clk, .enable = s5pv210_clk_ip3_ctrl, .ctrlbit = (1 << 20), - }, { - .name = "sromc", - .id = -1, - .parent = &clk_hclk_psys.clk, - .enable = s5pv210_clk_ip1_ctrl, - .ctrlbit = (1 << 26), }, }; diff --git a/trunk/arch/arm/mach-s5pv210/cpu.c b/trunk/arch/arm/mach-s5pv210/cpu.c index 61e6c24b90ac..8eb480e201b0 100644 --- a/trunk/arch/arm/mach-s5pv210/cpu.c +++ b/trunk/arch/arm/mach-s5pv210/cpu.c @@ -80,6 +80,11 @@ static struct map_desc s5pv210_iodesc[] __initdata = { .pfn = __phys_to_pfn(S3C_PA_UART), .length = SZ_512K, .type = MT_DEVICE, + }, { + .virtual = (unsigned long)S5P_VA_SROMC, + .pfn = __phys_to_pfn(S5PV210_PA_SROMC), + .length = SZ_4K, + .type = MT_DEVICE, }, { .virtual = (unsigned long)S5P_VA_DMC0, .pfn = __phys_to_pfn(S5PV210_PA_DMC0), diff --git a/trunk/arch/arm/mach-s5pv210/dev-audio.c b/trunk/arch/arm/mach-s5pv210/dev-audio.c index ddd2704b3467..1303fcb12b51 100644 --- a/trunk/arch/arm/mach-s5pv210/dev-audio.c +++ b/trunk/arch/arm/mach-s5pv210/dev-audio.c @@ -19,24 +19,22 @@ #include #include -static const char *rclksrc[] = { - [0] = "busclk", - [1] = "i2sclk", -}; - static int s5pv210_cfg_i2s(struct platform_device *pdev) { /* configure GPIO for i2s port */ switch (pdev->id) { - case 0: - s3c_gpio_cfgpin_range(S5PV210_GPI(0), 7, S3C_GPIO_SFN(2)); - break; case 1: s3c_gpio_cfgpin_range(S5PV210_GPC0(0), 5, S3C_GPIO_SFN(2)); break; + case 2: s3c_gpio_cfgpin_range(S5PV210_GPC1(0), 5, S3C_GPIO_SFN(4)); break; + + case -1: + s3c_gpio_cfgpin_range(S5PV210_GPI(0), 7, S3C_GPIO_SFN(2)); + break; + default: printk(KERN_ERR "Invalid Device %d\n", pdev->id); return -EINVAL; @@ -45,15 +43,8 @@ static int s5pv210_cfg_i2s(struct platform_device *pdev) return 0; } -static struct s3c_audio_pdata i2sv5_pdata = { +static struct s3c_audio_pdata s3c_i2s_pdata = { .cfg_gpio = s5pv210_cfg_i2s, - .type = { - .i2s = { - .quirks = QUIRK_PRI_6CHAN | QUIRK_SEC_DAI - | QUIRK_NEED_RSTCLR, - .src_clk = rclksrc, - }, - }, }; static struct resource s5pv210_iis0_resource[] = { @@ -72,34 +63,15 @@ static struct resource s5pv210_iis0_resource[] = { .end = DMACH_I2S0_RX, .flags = IORESOURCE_DMA, }, - [3] = { - .start = DMACH_I2S0S_TX, - .end = DMACH_I2S0S_TX, - .flags = IORESOURCE_DMA, - }, }; struct platform_device s5pv210_device_iis0 = { - .name = "samsung-i2s", - .id = 0, + .name = "s3c64xx-iis-v4", + .id = -1, .num_resources = ARRAY_SIZE(s5pv210_iis0_resource), .resource = s5pv210_iis0_resource, .dev = { - .platform_data = &i2sv5_pdata, - }, -}; - -static const char *rclksrc_v3[] = { - [0] = "iis", - [1] = "audio-bus", -}; - -static struct s3c_audio_pdata i2sv3_pdata = { - .cfg_gpio = s5pv210_cfg_i2s, - .type = { - .i2s = { - .src_clk = rclksrc_v3, - }, + .platform_data = &s3c_i2s_pdata, }, }; @@ -122,12 +94,12 @@ static struct resource s5pv210_iis1_resource[] = { }; struct platform_device s5pv210_device_iis1 = { - .name = "samsung-i2s", + .name = "s3c64xx-iis", .id = 1, .num_resources = ARRAY_SIZE(s5pv210_iis1_resource), .resource = s5pv210_iis1_resource, .dev = { - .platform_data = &i2sv3_pdata, + .platform_data = &s3c_i2s_pdata, }, }; @@ -150,12 +122,12 @@ static struct resource s5pv210_iis2_resource[] = { }; struct platform_device s5pv210_device_iis2 = { - .name = "samsung-i2s", + .name = "s3c64xx-iis", .id = 2, .num_resources = ARRAY_SIZE(s5pv210_iis2_resource), .resource = s5pv210_iis2_resource, .dev = { - .platform_data = &i2sv3_pdata, + .platform_data = &s3c_i2s_pdata, }, }; diff --git a/trunk/arch/arm/mach-s5pv210/include/mach/irqs.h b/trunk/arch/arm/mach-s5pv210/include/mach/irqs.h index 26710b35ef87..119b95fdc3ce 100644 --- a/trunk/arch/arm/mach-s5pv210/include/mach/irqs.h +++ b/trunk/arch/arm/mach-s5pv210/include/mach/irqs.h @@ -65,7 +65,7 @@ #define IRQ_HSMMC0 S5P_IRQ_VIC1(26) #define IRQ_HSMMC1 S5P_IRQ_VIC1(27) #define IRQ_HSMMC2 S5P_IRQ_VIC1(28) -#define IRQ_MIPI_CSIS S5P_IRQ_VIC1(29) +#define IRQ_MIPICSI S5P_IRQ_VIC1(29) #define IRQ_MIPIDSI S5P_IRQ_VIC1(30) #define IRQ_ONENAND_AUDI S5P_IRQ_VIC1(31) @@ -132,6 +132,5 @@ #define IRQ_LCD_FIFO IRQ_LCD0 #define IRQ_LCD_VSYNC IRQ_LCD1 #define IRQ_LCD_SYSTEM IRQ_LCD2 -#define IRQ_MIPI_CSIS0 IRQ_MIPI_CSIS #endif /* ASM_ARCH_IRQS_H */ diff --git a/trunk/arch/arm/mach-s5pv210/include/mach/map.h b/trunk/arch/arm/mach-s5pv210/include/mach/map.h index 3611492ad681..861d7fe11fc9 100644 --- a/trunk/arch/arm/mach-s5pv210/include/mach/map.h +++ b/trunk/arch/arm/mach-s5pv210/include/mach/map.h @@ -16,8 +16,6 @@ #include #include -#define S5PV210_PA_SROM_BANK5 (0xA8000000) - #define S5PC110_PA_ONENAND (0xB0000000) #define S5P_PA_ONENAND S5PC110_PA_ONENAND @@ -62,7 +60,6 @@ #define S3C_VA_UARTx(x) (S3C_VA_UART + ((x) * S3C_UART_OFFSET)) #define S5PV210_PA_SROMC (0xE8000000) -#define S5P_PA_SROMC S5PV210_PA_SROMC #define S5PV210_PA_CFCON (0xE8200000) @@ -110,8 +107,6 @@ #define S5PV210_PA_DMC0 (0xF0000000) #define S5PV210_PA_DMC1 (0xF1400000) -#define S5PV210_PA_MIPI_CSIS 0xFA600000 - /* compatibiltiy defines. */ #define S3C_PA_UART S5PV210_PA_UART #define S3C_PA_HSMMC0 S5PV210_PA_HSMMC(0) @@ -128,7 +123,6 @@ #define S5P_PA_FIMC0 S5PV210_PA_FIMC0 #define S5P_PA_FIMC1 S5PV210_PA_FIMC1 #define S5P_PA_FIMC2 S5PV210_PA_FIMC2 -#define S5P_PA_MIPI_CSIS0 S5PV210_PA_MIPI_CSIS #define SAMSUNG_PA_ADC S5PV210_PA_ADC #define SAMSUNG_PA_CFCON S5PV210_PA_CFCON diff --git a/trunk/arch/arm/mach-s5pv210/include/mach/regs-clock.h b/trunk/arch/arm/mach-s5pv210/include/mach/regs-clock.h index 4c45b74def5f..ebaabe021af9 100644 --- a/trunk/arch/arm/mach-s5pv210/include/mach/regs-clock.h +++ b/trunk/arch/arm/mach-s5pv210/include/mach/regs-clock.h @@ -161,7 +161,7 @@ #define S5P_MDNIE_SEL S5P_CLKREG(0x7008) #define S5P_MIPI_PHY_CON0 S5P_CLKREG(0x7200) #define S5P_MIPI_PHY_CON1 S5P_CLKREG(0x7204) -#define S5P_MIPI_DPHY_CONTROL S5P_CLKREG(0xE814) +#define S5P_MIPI_CONTROL S5P_CLKREG(0xE814) #define S5P_IDLE_CFG_TL_MASK (3 << 30) #define S5P_IDLE_CFG_TM_MASK (3 << 28) @@ -195,6 +195,9 @@ #define S5P_OTHERS_RET_UART (1 << 28) #define S5P_OTHERS_USB_SIG_MASK (1 << 16) +/* MIPI */ +#define S5P_MIPI_DPHY_EN (3) + /* S5P_DAC_CONTROL */ #define S5P_DAC_ENABLE (1) #define S5P_DAC_DISABLE (0) diff --git a/trunk/arch/arm/mach-s5pv210/mach-smdkc110.c b/trunk/arch/arm/mach-s5pv210/mach-smdkc110.c index bb20a14da100..5dd1681c069e 100644 --- a/trunk/arch/arm/mach-s5pv210/mach-smdkc110.c +++ b/trunk/arch/arm/mach-s5pv210/mach-smdkc110.c @@ -94,7 +94,6 @@ static struct platform_device *smdkc110_devices[] __initdata = { static struct i2c_board_info smdkc110_i2c_devs0[] __initdata = { { I2C_BOARD_INFO("24c08", 0x50), }, /* Samsung S524AD0XD1 */ - { I2C_BOARD_INFO("wm8580", 0x1b), }, }; static struct i2c_board_info smdkc110_i2c_devs1[] __initdata = { diff --git a/trunk/arch/arm/mach-s5pv210/mach-smdkv210.c b/trunk/arch/arm/mach-s5pv210/mach-smdkv210.c index 88e45223c8af..1fbc45b2a432 100644 --- a/trunk/arch/arm/mach-s5pv210/mach-smdkv210.c +++ b/trunk/arch/arm/mach-s5pv210/mach-smdkv210.c @@ -14,25 +14,16 @@ #include #include #include -#include -#include -#include -#include #include #include #include #include -#include