Skip to contentSkip to conversation

Samsung device updates

PATCH New Ben Dooks 2 participants 8 messages Jan 29, 2010

Subsystems (3)
lore
Share & tools
lore

Ben Dooks

author
#0 lore raw

Devices updates for cleanups, bugfixes and the odd improvement.

Currently on the next-samsung-devupdates2 branch.

author
#1 lore raw

PATCH 1/1 ARM: SAMSUNG: Add DMA masks to hsotg device

Add the required DMA masks to the hs-otg device definition to allow DMA to work with it.

---
 arch/arm/plat-samsung/dev-usb-hsotg.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
arch/arm/plat-samsung/dev-usb-hsotg.c +6 -0
index e2f604b..d8b7870 100644
@@ -33,9 +33,15 @@ static struct resource s3c_usb_hsotg_resources[] = {
 	},
 };
 
+static u64 s3c_hsotg_dmamask = 0xffffffffUL;
+
 struct platform_device s3c_device_usb_hsotg = {
 	.name		= "s3c-hsotg",
 	.id		= -1,
 	.num_resources	= ARRAY_SIZE(s3c_usb_hsotg_resources),
 	.resource	= s3c_usb_hsotg_resources,
+	.dev		= {
+		.dma_mask		= &s3c_hsotg_dmamask,
+		.coherent_dma_mask	= 0xffffffffUL,
+	},
 };
Signature · 1 line
1.6.0.4
#2 lore raw

PATCH 1/1 ARM: SAMSUNG: Add DMA masks to hsotg device

Hello.

Quoted 13 lines · Ben Dooks

Add the required DMA masks to the hs-otg device definition to allow DMA to work with it.

---
 arch/arm/plat-samsung/dev-usb-hsotg.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
arch/arm/plat-samsung/dev-usb-hsotg.c +0 -0
index e2f604b..d8b7870 100644

arch/arm/plat-samsung/dev-usb-hsotg.c static struct resource s3c_usb_hsotg_resources[] = { · line 38

Quoted 6 lines
arch/arm/plat-samsung/dev-usb-hsotg.c +2 -0
@@ -33,9 +33,15 @@ static struct resource s3c_usb_hsotg_resources[] = {
 	},
 };
 
+static u64 s3c_hsotg_dmamask = 0xffffffffUL;
+
 

Shouldn't this be DMA_BIT_MASK(32)?

arch/arm/plat-samsung/dev-usb-hsotg.c static struct resource s3c_usb_hsotg_resources[] = { · line 45

Quoted 9 lines
arch/arm/plat-samsung/dev-usb-hsotg.c +3 -0
 struct platform_device s3c_device_usb_hsotg = {
 	.name		= "s3c-hsotg",
 	.id		= -1,
 	.num_resources	= ARRAY_SIZE(s3c_usb_hsotg_resources),
 	.resource	= s3c_usb_hsotg_resources,
+	.dev		= {
+		.dma_mask		= &s3c_hsotg_dmamask,
+		.coherent_dma_mask	= 0xffffffffUL,

Same here...

WBR, Sergei

author
#3 lore raw

PATCH 1/1 ARM: S3C64XX: SPI: Make platform device compilation selectable

In reply to Ben Dooks

From: Jassi Brar <[email protected]>

The SPI controller platform devices should be compiled in independent of the driver support, otherwise we might end up with dev-spi built as kernel module.
Change this to make every machine select if it has some SPI device and wants to build device definitions.

---
 arch/arm/plat-s3c64xx/Makefile |    4 +++-
 arch/arm/plat-samsung/Kconfig  |    6 ++++++
 2 files changed, 9 insertions(+), 1 deletions(-)
arch/arm/plat-s3c64xx/Makefile +3 -1
index 80255a5..e60bde3 100644
@@ -40,6 +40,9 @@ obj-$(CONFIG_S3C64XX_DMA)	+= dma.o
 
 obj-$(CONFIG_S3C_ADC)		+= dev-adc.o
 
+# SPI support
+obj-$(CONFIG_S3C64XX_DEV_SPI) += dev-spi.o
+
 # Device setup
 
 obj-$(CONFIG_S3C64XX_SETUP_I2C0) += setup-i2c0.o
@@ -47,4 +50,3 @@ obj-$(CONFIG_S3C64XX_SETUP_I2C1) += setup-i2c1.o
 obj-$(CONFIG_S3C64XX_SETUP_FB_24BPP) += setup-fb-24bpp.o
 obj-$(CONFIG_S3C64XX_SETUP_SDHCI_GPIO) += setup-sdhci-gpio.o
 obj-$(CONFIG_SND_S3C24XX_SOC) += dev-audio.o
-obj-$(CONFIG_SPI_S3C64XX) += dev-spi.o
arch/arm/plat-samsung/Kconfig +6 -0
index 1c2fe91..72da646 100644
@@ -132,6 +132,12 @@ config S3C_DEV_NAND
 	help
 	  Compile in platform device definition for NAND controller
 
+config S3C64XX_DEV_SPI
+	bool
+	help
+	  Compile in platform device definitions for S3C64XX's type
+	  SPI controllers.
+
 comment "Power management"
 
 config SAMSUNG_PM_DEBUG
Signature · 1 line
1.6.0.4
author
#4 lore raw

PATCH 1/1 ARM: S3C2412: SoC has the fractional baud rate register

In reply to Ben Dooks

From: Michel Pollet <[email protected]>

The S3C2412 has a fractional baud rate register, this patch adds the corresponding flag to the UART definition to allow generation of more precise baud rates for the various clock combinations.

---
 drivers/serial/s3c2412.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
drivers/serial/s3c2412.c +1 -0
index ce75e28..1700b1a 100644
@@ -102,6 +102,7 @@ static struct s3c24xx_uart_info s3c2412_uart_inf = {
 	.name		= "Samsung S3C2412 UART",
 	.type		= PORT_S3C2412,
 	.fifosize	= 64,
+	.has_divslot	= 1,
 	.rx_fifomask	= S3C2440_UFSTAT_RXMASK,
 	.rx_fifoshift	= S3C2440_UFSTAT_RXSHIFT,
 	.rx_fifofull	= S3C2440_UFSTAT_RXFULL,
Signature · 1 line
1.6.0.4
author
#5 lore raw

PATCH 1/1 ARM: SAMSUNG: Add SERIAL_SAMSUNG_UARTS_4 Kconfig option

In reply to Ben Dooks

Add SERIAL_SAMSUNG_UARTS_4 to mop up the number of cases currently using four Samsung compatible UARTS.

---
 drivers/serial/Kconfig |   14 ++++++++++++--
 1 files changed, 12 insertions(+), 2 deletions(-)
drivers/serial/Kconfig +12 -2
index ebdd2b9..1d47c77 100644
@@ -455,11 +455,18 @@ config SERIAL_SAMSUNG
 	  provide all of these ports, depending on how the serial port
 	  pins are configured.
 
+config SERIAL_SAMSUNG_UARTS_4
+	bool
+	depends on ARM && PLAT_SAMSUNG
+	default y if CPU_S3C2443
+	help
+	  Internal node for the common case of 4 Samsung compatible UARTs
+
 config SERIAL_SAMSUNG_UARTS
 	int
 	depends on ARM && PLAT_S3C
 	default 2 if ARCH_S3C2400
-	default 4 if ARCH_S5P6440 || ARCH_S5PC1XX || ARCH_S5PV210 || ARCH_S3C64XX || CPU_S3C2443
+	default 4 if SERIAL_SAMSUNG_UARTS_4
 	default 3
 	help
 	  Select the number of available UART ports for the Samsung S3C
@@ -526,8 +533,9 @@ config SERIAL_S3C24A0
 	  Serial port support for the Samsung S3C24A0 SoC
 
 config SERIAL_S3C6400
-	tristate "Samsung S3C6400/S3C6410/S5P6440 Serial port support"
+	tristate "Samsung S3C6400/S3C6410/S5P6440 Seria port support"
 	depends on SERIAL_SAMSUNG && (CPU_S3C6400 || CPU_S3C6410 || CPU_S5P6440)
+	select SERIAL_SAMSUNG_UARTS_4
 	default y
 	help
 	  Serial port support for the Samsung S3C6400, S3C6410 and S5P6440
@@ -536,6 +544,7 @@ config SERIAL_S3C6400
 config SERIAL_S5PC100
 	tristate "Samsung S5PC100 Serial port support"
 	depends on SERIAL_SAMSUNG && CPU_S5PC100
+	select SERIAL_SAMSUNG_UARTS_4
 	default y
 	help
 	  Serial port support for the Samsung S5PC100 SoCs
@@ -543,6 +552,7 @@ config SERIAL_S5PC100
 config SERIAL_S5PV210
 	tristate "Samsung S5PV210 Serial port support"
 	depends on SERIAL_SAMSUNG && CPU_S5PV210
+	select SERIAL_SAMSUNG_UARTS_4
 	default y
 	help
 	  Serial port support for Samsung's S5P Family of SoC's
Signature · 1 line
1.6.0.4
author
#6 lore raw

PATCH 1/1 ARM: SAMSUNG: Use PLAT_SAMSUNG instead of PLAT_S3C

In reply to Ben Dooks

As part of the development process, it is hoped PLAT_S3C is either removed from all of the PLAT_SAMSUNG derived platforms or removed entirely. It is also better to use PLAT_SAMSUNG as this is the current base of all Samsung devices.

Change the two places that use PLAT_S3C to use PLAT_SAMSUNG

---
 drivers/serial/Kconfig |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
drivers/serial/Kconfig +2 -2
index 1d47c77..b2157c3 100644
@@ -447,7 +447,7 @@ config SERIAL_CLPS711X_CONSOLE
 
 config SERIAL_SAMSUNG
 	tristate "Samsung SoC serial support"
-	depends on ARM && PLAT_S3C
+	depends on ARM && PLAT_SAMSUNG
 	select SERIAL_CORE
 	help
 	  Support for the on-chip UARTs on the Samsung S3C24XX series CPUs,
@@ -464,7 +464,7 @@ config SERIAL_SAMSUNG_UARTS_4
 
 config SERIAL_SAMSUNG_UARTS
 	int
-	depends on ARM && PLAT_S3C
+	depends on ARM && PLAT_SAMSUNG
 	default 2 if ARCH_S3C2400
 	default 4 if SERIAL_SAMSUNG_UARTS_4
 	default 3
Signature · 1 line
1.6.0.4
author
#7 lore raw

PATCH 1/1 ARM: S3C64XX: Make audio device code built unconditionally

In reply to Ben Dooks

Making the code depend on CONFIG_SND_S3C24XX_SOC means that if the ASoC code is build modularily, the boards will fail to link due to the device code also being built as a module.

As per Mark Brown's suggestions, just compile this always as it is expected many machines will have audio.

Also move the obj-y line out of the device setup area into a new area just for devices.

---
 arch/arm/plat-s3c64xx/Makefile |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
arch/arm/plat-s3c64xx/Makefile +4 -1
index e60bde3..33a73f3 100644
@@ -43,10 +43,13 @@ obj-$(CONFIG_S3C_ADC)		+= dev-adc.o
 # SPI support
 obj-$(CONFIG_S3C64XX_DEV_SPI) += dev-spi.o
 
+# Device support
+obj-y				+= dev-audio.o
+
 # Device setup
 
 obj-$(CONFIG_S3C64XX_SETUP_I2C0) += setup-i2c0.o
 obj-$(CONFIG_S3C64XX_SETUP_I2C1) += setup-i2c1.o
 obj-$(CONFIG_S3C64XX_SETUP_FB_24BPP) += setup-fb-24bpp.o
 obj-$(CONFIG_S3C64XX_SETUP_SDHCI_GPIO) += setup-sdhci-gpio.o
-obj-$(CONFIG_SND_S3C24XX_SOC) += dev-audio.o
+
Signature · 1 line
1.6.0.4