Skip to content

Commit

Permalink
Merge branch 'for-rmk/2635' of git://git.fluff.org/bjdooks/linux into…
Browse files Browse the repository at this point in the history
… devel-stable
  • Loading branch information
Russell King committed May 17, 2010
2 parents b12f3cb + 63b1f51 commit a3685f0
Showing 68 changed files with 2,016 additions and 817 deletions.
7 changes: 6 additions & 1 deletion arch/arm/Kconfig
Original file line number Diff line number Diff line change
@@ -657,7 +657,7 @@ config ARCH_SA1100
Support for StrongARM 11x0 based boards.

config ARCH_S3C2410
bool "Samsung S3C2410, S3C2412, S3C2413, S3C2440, S3C2442, S3C2443"
bool "Samsung S3C2410, S3C2412, S3C2413, S3C2416, S3C2440, S3C2442, S3C2443, S3C2450"
select GENERIC_GPIO
select ARCH_HAS_CPUFREQ
select HAVE_CLK
@@ -666,6 +666,10 @@ config ARCH_S3C2410
BAST (<http://www.simtec.co.uk/products/EB110ITX/>), the IPAQ 1940 or
the Samsung SMDK2410 development board (and derivatives).

Note, the S3C2416 and the S3C2450 are so close that they even share
the same SoC ID code. This means that there is no seperate machine
directory (no arch/arm/mach-s3c2450) as the S3C2416 was first.

config ARCH_S3C64XX
bool "Samsung S3C64XX"
select PLAT_SAMSUNG
@@ -904,6 +908,7 @@ if ARCH_S3C2410
source "arch/arm/mach-s3c2400/Kconfig"
source "arch/arm/mach-s3c2410/Kconfig"
source "arch/arm/mach-s3c2412/Kconfig"
source "arch/arm/mach-s3c2416/Kconfig"
source "arch/arm/mach-s3c2440/Kconfig"
source "arch/arm/mach-s3c2443/Kconfig"
endif
2 changes: 1 addition & 1 deletion arch/arm/Makefile
Original file line number Diff line number Diff line change
@@ -161,7 +161,7 @@ machine-$(CONFIG_ARCH_PNX4008) := pnx4008
machine-$(CONFIG_ARCH_PXA) := pxa
machine-$(CONFIG_ARCH_REALVIEW) := realview
machine-$(CONFIG_ARCH_RPC) := rpc
machine-$(CONFIG_ARCH_S3C2410) := s3c2410 s3c2400 s3c2412 s3c2440 s3c2443
machine-$(CONFIG_ARCH_S3C2410) := s3c2410 s3c2400 s3c2412 s3c2416 s3c2440 s3c2443
machine-$(CONFIG_ARCH_S3C24A0) := s3c24a0
machine-$(CONFIG_ARCH_S3C64XX) := s3c64xx
machine-$(CONFIG_ARCH_S5P6440) := s5p6440
1 change: 1 addition & 0 deletions arch/arm/mach-s3c2410/Kconfig
Original file line number Diff line number Diff line change
@@ -6,6 +6,7 @@ config CPU_S3C2410
bool
depends on ARCH_S3C2410
select CPU_ARM920T
select S3C_GPIO_PULL_UP
select S3C2410_CLOCK
select S3C2410_GPIO
select CPU_LLSERIAL_S3C2410
32 changes: 20 additions & 12 deletions arch/arm/mach-s3c2410/h1940-bluetooth.c
Original file line number Diff line number Diff line change
@@ -33,14 +33,15 @@ static void h1940bt_enable(int on)
h1940_latch_control(0, H1940_LATCH_BLUETOOTH_POWER);
/* Reset the chip */
mdelay(10);
s3c2410_gpio_setpin(S3C2410_GPH(1), 1);

gpio_set_value(S3C2410_GPH(1), 1);
mdelay(10);
s3c2410_gpio_setpin(S3C2410_GPH(1), 0);
gpio_set_value(S3C2410_GPH(1), 0);
}
else {
s3c2410_gpio_setpin(S3C2410_GPH(1), 1);
gpio_set_value(S3C2410_GPH(1), 1);
mdelay(10);
s3c2410_gpio_setpin(S3C2410_GPH(1), 0);
gpio_set_value(S3C2410_GPH(1), 0);
mdelay(10);
h1940_latch_control(H1940_LATCH_BLUETOOTH_POWER, 0);
}
@@ -61,15 +62,21 @@ static int __devinit h1940bt_probe(struct platform_device *pdev)
struct rfkill *rfk;
int ret = 0;

ret = gpio_request(S3C2410_GPH(1), dev_name(&pdev->dev));
if (ret) {
dev_err(&pdev->dev, "could not get GPH1\n");\
return ret;
}

/* Configures BT serial port GPIOs */
s3c2410_gpio_cfgpin(S3C2410_GPH(0), S3C2410_GPH0_nCTS0);
s3c2410_gpio_pullup(S3C2410_GPH(0), 1);
s3c2410_gpio_cfgpin(S3C2410_GPH(1), S3C2410_GPIO_OUTPUT);
s3c2410_gpio_pullup(S3C2410_GPH(1), 1);
s3c2410_gpio_cfgpin(S3C2410_GPH(2), S3C2410_GPH2_TXD0);
s3c2410_gpio_pullup(S3C2410_GPH(2), 1);
s3c2410_gpio_cfgpin(S3C2410_GPH(3), S3C2410_GPH3_RXD0);
s3c2410_gpio_pullup(S3C2410_GPH(3), 1);
s3c_gpio_cfgpin(S3C2410_GPH(0), S3C2410_GPH0_nCTS0);
s3c_gpio_cfgpull(S3C2410_GPH(0), S3C_GPIO_PULL_NONE);
s3c_gpio_cfgpin(S3C2410_GPH(1), S3C2410_GPIO_OUTPUT);
s3c_gpio_cfgpull(S3C2410_GPH(1), S3C_GPIO_PULL_NONE);
s3c_gpio_cfgpin(S3C2410_GPH(2), S3C2410_GPH2_TXD0);
s3c_gpio_cfgpull(S3C2410_GPH(2), S3C_GPIO_PULL_NONE);
s3c_gpio_cfgpin(S3C2410_GPH(3), S3C2410_GPH3_RXD0);
s3c_gpio_cfgpull(S3C2410_GPH(3), S3C_GPIO_PULL_NONE);


rfk = rfkill_alloc(DRV_NAME, &pdev->dev, RFKILL_TYPE_BLUETOOTH,
@@ -100,6 +107,7 @@ static int h1940bt_remove(struct platform_device *pdev)
struct rfkill *rfk = platform_get_drvdata(pdev);

platform_set_drvdata(pdev, NULL);
gpio_free(S3C2410_GPH(1));

if (rfk) {
rfkill_unregister(rfk);
2 changes: 1 addition & 1 deletion arch/arm/mach-s3c2410/include/mach/dma.h
Original file line number Diff line number Diff line change
@@ -54,7 +54,7 @@ enum dma_ch {
#define DMACH_LOW_LEVEL (1<<28) /* use this to specifiy hardware ch no */

/* we have 4 dma channels */
#ifndef CONFIG_CPU_S3C2443
#if !defined(CONFIG_CPU_S3C2443) && !defined(CONFIG_CPU_S3C2416)
#define S3C_DMA_CHANNELS (4)
#else
#define S3C_DMA_CHANNELS (6)
47 changes: 24 additions & 23 deletions arch/arm/mach-s3c2410/include/mach/gpio-fns.h
Original file line number Diff line number Diff line change
@@ -10,32 +10,35 @@
* published by the Free Software Foundation.
*/

#ifndef __MACH_GPIO_FNS_H
#define __MACH_GPIO_FNS_H __FILE__

/* These functions are in the to-be-removed category and it is strongly
* encouraged not to use these in new code. They will be marked deprecated
* very soon.
*
* Most of the functionality can be either replaced by the gpiocfg calls
* for the s3c platform or by the generic GPIOlib API.
*
* As of 2.6.35-rc, these will be removed, with the few drivers using them
* either replaced or given a wrapper until the calls can be removed.
*/

#include <plat/gpio-cfg.h>

static inline void s3c2410_gpio_cfgpin(unsigned int pin, unsigned int cfg)
{
/* 1:1 mapping between cfgpin and setcfg calls at the moment */
s3c_gpio_cfgpin(pin, cfg);
}

/* external functions for GPIO support
*
* These allow various different clients to access the same GPIO
* registers without conflicting. If your driver only owns the entire
* GPIO register, then it is safe to ioremap/__raw_{read|write} to it.
*/

/* s3c2410_gpio_cfgpin
*
* set the configuration of the given pin to the value passed.
*
* eg:
* s3c2410_gpio_cfgpin(S3C2410_GPA(0), S3C2410_GPA0_ADDR0);
* s3c2410_gpio_cfgpin(S3C2410_GPE(8), S3C2410_GPE8_SDDAT1);
*/

extern void s3c2410_gpio_cfgpin(unsigned int pin, unsigned int function);

extern unsigned int s3c2410_gpio_getcfg(unsigned int pin);

/* s3c2410_gpio_getirq
@@ -71,6 +74,14 @@ extern int s3c2400_gpio_getirq(unsigned int pin);
extern int s3c2410_gpio_irqfilter(unsigned int pin, unsigned int on,
unsigned int config);

/* s3c2410_gpio_pullup
*
* This call should be replaced with s3c_gpio_setpull().
*
* As a note, there is currently no distinction between pull-up and pull-down
* in the s3c24xx series devices with only an on/off configuration.
*/

/* s3c2410_gpio_pullup
*
* configure the pull-up control on the given pin
@@ -86,18 +97,8 @@ extern int s3c2410_gpio_irqfilter(unsigned int pin, unsigned int on,

extern void s3c2410_gpio_pullup(unsigned int pin, unsigned int to);

/* s3c2410_gpio_getpull
*
* Read the state of the pull-up on a given pin
*
* return:
* < 0 => error code
* 0 => enabled
* 1 => disabled
*/

extern int s3c2410_gpio_getpull(unsigned int pin);

extern void s3c2410_gpio_setpin(unsigned int pin, unsigned int to);

extern unsigned int s3c2410_gpio_getpin(unsigned int pin);

#endif /* __MACH_GPIO_FNS_H */
12 changes: 12 additions & 0 deletions arch/arm/mach-s3c2410/include/mach/gpio-nrs.h
Original file line number Diff line number Diff line change
@@ -34,6 +34,10 @@
#define S3C2410_GPIO_F_NR (32)
#define S3C2410_GPIO_G_NR (32)
#define S3C2410_GPIO_H_NR (32)
#define S3C2410_GPIO_J_NR (32) /* technically 16. */
#define S3C2410_GPIO_K_NR (32) /* technically 16. */
#define S3C2410_GPIO_L_NR (32) /* technically 15. */
#define S3C2410_GPIO_M_NR (32) /* technically 2. */

#if CONFIG_S3C_GPIO_SPACE != 0
#error CONFIG_S3C_GPIO_SPACE cannot be zero at the moment
@@ -53,6 +57,10 @@ enum s3c_gpio_number {
S3C2410_GPIO_F_START = S3C2410_GPIO_NEXT(S3C2410_GPIO_E),
S3C2410_GPIO_G_START = S3C2410_GPIO_NEXT(S3C2410_GPIO_F),
S3C2410_GPIO_H_START = S3C2410_GPIO_NEXT(S3C2410_GPIO_G),
S3C2410_GPIO_J_START = S3C2410_GPIO_NEXT(S3C2410_GPIO_H),
S3C2410_GPIO_K_START = S3C2410_GPIO_NEXT(S3C2410_GPIO_J),
S3C2410_GPIO_L_START = S3C2410_GPIO_NEXT(S3C2410_GPIO_K),
S3C2410_GPIO_M_START = S3C2410_GPIO_NEXT(S3C2410_GPIO_L),
};

#endif /* __ASSEMBLY__ */
@@ -67,6 +75,10 @@ enum s3c_gpio_number {
#define S3C2410_GPF(_nr) (S3C2410_GPIO_F_START + (_nr))
#define S3C2410_GPG(_nr) (S3C2410_GPIO_G_START + (_nr))
#define S3C2410_GPH(_nr) (S3C2410_GPIO_H_START + (_nr))
#define S3C2410_GPJ(_nr) (S3C2410_GPIO_J_START + (_nr))
#define S3C2410_GPK(_nr) (S3C2410_GPIO_K_START + (_nr))
#define S3C2410_GPL(_nr) (S3C2410_GPIO_L_START + (_nr))
#define S3C2410_GPM(_nr) (S3C2410_GPIO_M_START + (_nr))

/* compatibility until drivers can be modified */

25 changes: 24 additions & 1 deletion arch/arm/mach-s3c2410/include/mach/irqs.h
Original file line number Diff line number Diff line change
@@ -115,6 +115,26 @@
#define IRQ_S3C2412_SDI S3C2410_IRQSUB(13)
#define IRQ_S3C2412_CF S3C2410_IRQSUB(14)


#define IRQ_S3C2416_EINT8t15 S3C2410_IRQ(5)
#define IRQ_S3C2416_DMA S3C2410_IRQ(17)
#define IRQ_S3C2416_UART3 S3C2410_IRQ(18)
#define IRQ_S3C2416_SDI1 S3C2410_IRQ(20)
#define IRQ_S3C2416_SDI0 S3C2410_IRQ(21)

#define IRQ_S3C2416_LCD2 S3C2410_IRQSUB(15)
#define IRQ_S3C2416_LCD3 S3C2410_IRQSUB(16)
#define IRQ_S3C2416_LCD4 S3C2410_IRQSUB(17)
#define IRQ_S3C2416_DMA0 S3C2410_IRQSUB(18)
#define IRQ_S3C2416_DMA1 S3C2410_IRQSUB(19)
#define IRQ_S3C2416_DMA2 S3C2410_IRQSUB(20)
#define IRQ_S3C2416_DMA3 S3C2410_IRQSUB(21)
#define IRQ_S3C2416_DMA4 S3C2410_IRQSUB(22)
#define IRQ_S3C2416_DMA5 S3C2410_IRQSUB(23)
#define IRQ_S32416_WDT S3C2410_IRQSUB(27)
#define IRQ_S32416_AC97 S3C2410_IRQSUB(28)


/* extra irqs for s3c2440 */

#define IRQ_S3C2440_CAM_C S3C2410_IRQSUB(11) /* S3C2443 too */
@@ -130,7 +150,10 @@
#define IRQ_S3C2443_HSMMC S3C2410_IRQ(20) /* IRQ_SDI */
#define IRQ_S3C2443_NAND S3C2410_IRQ(24) /* reserved */

#define IRQ_S3C2416_HSMMC0 S3C2410_IRQ(21) /* S3C2416/S3C2450 */

#define IRQ_HSMMC0 IRQ_S3C2443_HSMMC
#define IRQ_HSMMC1 IRQ_S3C2416_HSMMC0

#define IRQ_S3C2443_LCD1 S3C2410_IRQSUB(14)
#define IRQ_S3C2443_LCD2 S3C2410_IRQSUB(15)
@@ -152,7 +175,7 @@
#define IRQ_S3C2443_WDT S3C2410_IRQSUB(27)
#define IRQ_S3C2443_AC97 S3C2410_IRQSUB(28)

#ifdef CONFIG_CPU_S3C2443
#if defined(CONFIG_CPU_S3C2443) || defined(CONFIG_CPU_S3C2416)
#define NR_IRQS (IRQ_S3C2443_AC97+1)
#else
#define NR_IRQS (IRQ_S3C2440_AC97+1)
5 changes: 3 additions & 2 deletions arch/arm/mach-s3c2410/include/mach/map.h
Original file line number Diff line number Diff line change
@@ -63,9 +63,9 @@
#define S3C2440_PA_AC97 (0x5B000000)
#define S3C2440_SZ_AC97 SZ_1M

/* S3C2443 High-speed SD/MMC */
/* S3C2443/S3C2416 High-speed SD/MMC */
#define S3C2443_PA_HSMMC (0x4A800000)
#define S3C2443_SZ_HSMMC (256)
#define S3C2416_PA_HSMMC0 (0x4AC00000)

/* S3C2412 memory and IO controls */
#define S3C2412_PA_SSMC (0x4F000000)
@@ -110,6 +110,7 @@
#define S3C_PA_UART S3C24XX_PA_UART
#define S3C_PA_USBHOST S3C2410_PA_USBHOST
#define S3C_PA_HSMMC0 S3C2443_PA_HSMMC
#define S3C_PA_HSMMC1 S3C2416_PA_HSMMC0
#define S3C_PA_NAND S3C24XX_PA_NAND

#endif /* __ASM_ARCH_MAP_H */
2 changes: 2 additions & 0 deletions arch/arm/mach-s3c2410/include/mach/regs-clock.h
Original file line number Diff line number Diff line change
@@ -161,4 +161,6 @@

#endif /* CONFIG_CPU_S3C2412 | CONFIG_CPU_S3C2413 */

#define S3C2416_CLKDIV2 S3C2410_CLKREG(0x28)

#endif /* __ASM_ARM_REGS_CLOCK */
36 changes: 36 additions & 0 deletions arch/arm/mach-s3c2410/include/mach/regs-dsc.h
Original file line number Diff line number Diff line change
@@ -19,6 +19,42 @@
#define S3C2412_DSC1 S3C2410_GPIOREG(0xe0)
#endif

#if defined(CONFIG_CPU_S3C2416)
#define S3C2416_DSC0 S3C2410_GPIOREG(0xc0)
#define S3C2416_DSC1 S3C2410_GPIOREG(0xc4)
#define S3C2416_DSC2 S3C2410_GPIOREG(0xc8)
#define S3C2416_DSC3 S3C2410_GPIOREG(0x110)

#define S3C2416_SELECT_DSC0 (0 << 30)
#define S3C2416_SELECT_DSC1 (1 << 30)
#define S3C2416_SELECT_DSC2 (2 << 30)
#define S3C2416_SELECT_DSC3 (3 << 30)

#define S3C2416_DSC_GETSHIFT(x) (x & 30)

#define S3C2416_DSC0_CF (S3C2416_SELECT_DSC0 | 28)
#define S3C2416_DSC0_CF_5mA (0 << 28)
#define S3C2416_DSC0_CF_10mA (1 << 28)
#define S3C2416_DSC0_CF_15mA (2 << 28)
#define S3C2416_DSC0_CF_21mA (3 << 28)
#define S3C2416_DSC0_CF_MASK (3 << 28)

#define S3C2416_DSC0_nRBE (S3C2416_SELECT_DSC0 | 26)
#define S3C2416_DSC0_nRBE_5mA (0 << 26)
#define S3C2416_DSC0_nRBE_10mA (1 << 26)
#define S3C2416_DSC0_nRBE_15mA (2 << 26)
#define S3C2416_DSC0_nRBE_21mA (3 << 26)
#define S3C2416_DSC0_nRBE_MASK (3 << 26)

#define S3C2416_DSC0_nROE (S3C2416_SELECT_DSC0 | 24)
#define S3C2416_DSC0_nROE_5mA (0 << 24)
#define S3C2416_DSC0_nROE_10mA (1 << 24)
#define S3C2416_DSC0_nROE_15mA (2 << 24)
#define S3C2416_DSC0_nROE_21mA (3 << 24)
#define S3C2416_DSC0_nROE_MASK (3 << 24)

#endif

#if defined(CONFIG_CPU_S3C244X)

#define S3C2440_DSC0 S3C2410_GPIOREG(0xc4)
Loading

0 comments on commit a3685f0

Please sign in to comment.