Commit graph

7370 commits

Author SHA1 Message Date
Ben Dooks
1725c679a0 ARM: S3C64XX: Update s3c6400_defconfig for current kernel
Update the s3c6400_defconfig with one from the current kernel which has been
build and run tested on an SMDK6410.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2010-01-21 15:37:15 +09:00
Ben Dooks
3a3b585aa4 ARM: S3C6400: Update s3c6400_defconfig for bigger initrds for SMDK6410
The Samsung initrd for SMDK6410 is now bigger than the original initrds
that where used. Increase the command-line size and the size of the ramdisk
that it is unpacked into.

Also change the default init to /linuxrc to avoid problems with the current
SMDK ramdisk image failing to run /bin/bash.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2010-01-21 15:36:40 +09:00
Ben Dooks
75497d96b2 ARM: S3C64XX: Tidy up common code in s3c64xx_spi_set_info()
The s3c64xx_spi_set_info() sets one of two platform data structures depending
on which controller is being specified. Change to taking a pointer to the
relevant platform data structure and then having one set of code to place
the data into the area being pointed to.

Cc: Jassi Brar <jassi.brar@samsung.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2010-01-21 14:24:52 +09:00
Maurus Cuelenaere
bd548e5ef2 ARM: S3C64XX: Fix typo in s3c-hsotg platform data
ARM: S3C64XX: Fix typo in s3c-hsotg platform data

Signed-off-by: Maurus Cuelenaere <mcuelenaere@gmail.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2010-01-21 13:55:16 +09:00
Mark Brown
46f2b478b2 ARM: SAMSUNG: Staticise gpiolib implementation functions
They are not exported, they are referenced via vtables.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2010-01-21 13:55:15 +09:00
Mark Brown
8dcdd6e6bb ARM: S3C64XX: Staticise audio platform data
It's not exported.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2010-01-21 13:55:15 +09:00
Mark Brown
1c24522c05 ARM: S3C64XX: Fix dev-audio build
As reported when the patch was posted commit 71269364 ("ARM: S3C64XX:
Add I2S resources in platform code") uses pin names for the IISv4
data output pins which are not present in mainline, causing dev-audio
to fail to build. Fix this by using the defines which are actually
present in the kernel source.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2010-01-21 13:55:15 +09:00
Mark Brown
9fca878623 ARM: SMDK6410: Set up interrupt range for WM835x on 1190-EV1 PMIC board
The WM835x driver won't actually use this yet but it will in the
future when the changes converting it to genirq are merged.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2010-01-21 13:55:15 +09:00
Ben Dooks
8005745d6e ARM: SAMSUNG: Move pm-check.c to plat-samsung
Move the pm-check.c file to plat-samsung for all Samsung SoC users, and
update Kconfig names to make them SAMSUNG_ instead of S3C2410_

Sed expresions used to make the change:

    s/S3C2410_PM_DEBUG/SAMSUNG_PM_DEBUG/g
    s/S3C2410_PM_CHECK/SAMSUNG_PM_CHECK/g

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2010-01-21 13:45:58 +09:00
Ben Dooks
106cc6aa73 ARM: SAMSUNG: Move pmw.c to plat-samsung
Move the PWM driver support to plat-samsung, as these PWM blocks are
close enough across the current range to be supported by this driver.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2010-01-21 13:45:57 +09:00
Ben Dooks
6890556c14 ARM: SAMSUNG: Move more support into plat-samsung
Move header files which are not likely to be touched in
any further support addition out of plat-s3c's include
directory into plat-samsung.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2010-01-21 13:45:51 +09:00
Kukjin Kim
af1519408a ARM: S5P6440: Add IO descriptor for ChipID block.
This patch adds the IO descriptor for ChipID block in S5P6440.

Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2010-01-19 18:52:54 +09:00
Ben Dooks
e856bb1f8d ARM: SAMSUNG: Remove empty gpio-core.h and use central plat/gpio-core.h
Rename mach-s3c2410/include/mach/gpio-core.h to mach/gpio-track.h so that
it can be included by <plat/gpio-core.h> when needed.

Eliminate all other empty gpio-core.h files and just include the
<plat/gpio-core.h> as necessary.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2010-01-19 18:46:02 +09:00
Ben Dooks
16e2c7c59f ARM: SAMSUNG: Move GPIO headers to plat-samsung
Move the GPIO and GPIO configuration headers into arch/arm/plat-samsung
as they are common to all the Samsung SoCs.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2010-01-19 18:37:19 +09:00
Ben Dooks
4f2b617aff ARM: SAMSUNG: Move gpiolib support in gpio.c to plat-samsung
Move the gpio.c code containing the core gpiolib and GPIO support to
plat-samsung from plat-s3c as it is used by all current Samsung SoCs.

Note, we didn't move this to gpiolib.c as it contains code that is not
strictly for gpiolib support and the 4bit code is already called gpiolib.c
so make the change easier by not renaming both files in one go.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2010-01-19 18:37:19 +09:00
Ben Dooks
67866fb386 ARM: SAMSUNG: Move pm-gpio into plat-samsung
Move the pm-gpio code into plat-samsung.

Note, this should be changed later to properly compile the 4bit code if
the 4bit settings are enabled.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2010-01-19 18:37:19 +09:00
Kukjin Kim
42d828d46f ARM: S5P6440: Add S5P6440 GPIO support
This patch adds Samsung's S5P6440 GPIO support.

Signed-off-by: Adityapratap Sharma <aditya.ps@samsung.com>
Signed-off-by: Atul Dahiya <atul.dahiya@samsung.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2010-01-19 18:37:18 +09:00
Kukjin Kim
1f323cfda5 ARM: SAMSUNG: Move GPIO common functions to plat-samsung
This patch moves GPIO common functions (from plat-s3c64xx) into plat-samsung.
and adds the config option to build the plat-samsung/gpiolib for Samsung SoCs.

Signed-off-by: Adityapratap Sharma <aditya.ps@samsung.com>
Signed-off-by: Atul Dahiya <atul.dahiya@samsung.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2010-01-19 18:37:18 +09:00
Ben Dooks
ea2de1dc8b ARM: Merge next-samsung-clock2
Merge branch 'next-samsung-clock2' into next-samsung-try7
2010-01-19 18:36:12 +09:00
Ben Dooks
668dfc7527 ARM: Merge next-samsung-devupdates1
Merge branch 'next-samsung-devupdates1' into next-samsung-try7
2010-01-19 18:36:09 +09:00
Ben Dooks
22c810ab3e ARM: S3C24XX: Add mci platform data set call s3c24xx_mci_set_platdata().
Add a s3c24xx_mci_set_platdata() call for all the machine files that have
platform data for the MCI driver. This brings the MCI device into line with
the other devices with __initdata and a specific call to ensure the right
structure type is being passed.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2010-01-19 17:21:38 +09:00
Ben Dooks
3cd2fff59f ARM: MINI2440: Remove commented out devices from device array
There's no point in having these in until there is proper support for
them, so remove as they only confuse the device changing script.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2010-01-19 09:23:52 +09:00
Ben Dooks
f126752043 ARM: SAMSUNG: Add platform data registration for OHCI
Add a platform data helper for the OHCI device

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2010-01-19 09:23:51 +09:00
Ben Dooks
0a6361316d ARM: SAMSUNG: Make UART device code common
Move s3c24xx_uart_devs, s3c24xx_uart_src and the platform devices to a
common entry in plat-samsung since they are the same in all the current
implementations.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2010-01-19 09:23:50 +09:00
Jassi Brar
6a2b411164 ARM: S3C64XX: SPI: Define SPI controller devices
Platform devices for SPI Controller of S3C64XX are defined and exported for
machines to include. Also, controller setup helper functions are defined for
machine code to set runtime configuration of the controller and the bus.

Signed-off-by: Jassi Brar <jassi.brar@samsung.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2010-01-18 18:27:52 +09:00
Jassi Brar
398ccccb77 ARM: S3C64XX: SPI: Header for passing platform data
We need a way to pass controller specific information to the SPI driver.
For that purpose new headers are made.

SPI Controller is assumed 'type-s3c64xx' and can be defined for newer SoCs.
 Hence, that part is placed under plat-samsung to be shared across newer SoCs.

SoC specific part - spi source clocks, will be placed
under plat-<soc>/include/plat/

Signed-off-by: Jassi Brar <jassi.brar@samsung.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2010-01-18 18:27:15 +09:00
Jassi Brar
87315a802a ARM: S3C64XX: SPI: Define SPI-48M clock sources
Defined special 48MHz clock sources for SPI-0,1.

Signed-off-by: Jassi Brar <jassi.brar@samsung.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2010-01-18 17:26:58 +09:00
Jassi Brar
10f9f743f6 ARM: S3C64XX: SPI: Add SPI controller register base
Added SPI controller register base.

Signed-off-by: Jassi Brar <jassi.brar@samsung.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2010-01-18 17:26:48 +09:00
Ben Dooks
f9e011b6b3 ARM: SAMSUNG: Fix bug in clksrc-clk round_rate call.
The call has been assuming all clksrc-clks' divider size is 4 bits, but
this may not be the case anymore. Use the reg_div.size parameter to
calculate the maximum value it can take and check against that.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2010-01-18 16:00:56 +09:00
Ben Dooks
f3b464cca9 ARM: SAMSUNG: Fix clksrc-clk's checks for bad register settings
The WARN_ON() was only checking the first clock in the array, instead of
being executed for each clksrc clock being registered.

Since this is an array of clocks, WARN_ON() does not provide a lot of
useful information about the problem, so change to using printk(KERN_ERR)
to report the problem to the console.

As a note, we still try and register the clock even if these problems are
present just in case and to avoid changing the behaviour of the registration
process.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2010-01-18 15:37:25 +09:00
Thomas Abraham
b8792dbff6 ARM: SAMSUNG: Add check to ensure that clksrc_clk does have multiple clock sources
Adds a additional check in s3c_set_clksrc function to ensure that the clksrc_clk
does have a choice of multiple clock sources. In addition to this, a check is
added to ensure that a parent is assigned to the clksrc_clk in case it does not
have a choice of parent clocks.

Signed-off-by: Thomas Abraham <thomas.ab@samsung.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2010-01-18 15:28:37 +09:00
Ben Dooks
a0de298a0e ARM: S5PC1XX: Register pd0 and hd0 clocks, remove unecessary dummy_enable
The clk_hd0 and clk_pd0 where given a local dummy_enable call due to
not being registered with the clock code, which they really should have
been. Register these two clocks and remove the clk_dummy_enable as this
is done by the default clock registration code.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2010-01-18 15:28:28 +09:00
Andy Green
a4e946947b ARM: SMDK6410: Add comments on ethernet connectivity
LAN9115 Ethernet only works on SMDK6410 if certain switches
are set in specific ways.  Document the requirement.

Signed-off-by: Andy Green <andy@warmcat.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2010-01-18 11:41:04 +09:00
Andy Green
810f613c03 ARM: S3C64XX: Add virtual mapping for S3C64XX SROM area
This adds the physical address of the SROM unit, and
applies a virtual mapping for it to the S3C_VA_MEM
slot.

Signed-off-by: Andy Green <andy@warmcat.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2010-01-18 11:41:03 +09:00
Andy Green
f01fdac005 ARM: SMDK6410: Add nC1 chipselect SROM setup
Since the mach-smdk6410.c file claims it can start up the
smsc9115 ethernet device on the board, it should take care
about configuring the necessary chip select nCS1 so it can
see the chip.  The select defaults to 8-bit mode so without
config the Ethernet doesn't work.

This patch uses the new SROM definitions to set nCS1 to the
state found in the Samsung U-Boot port for 6410.  It may be
more conservative that it needs to be since those settings
were marked as for CS8900A also using this chip select.

But this change is enough to get the ethernet working when
booted with Qi.

Signed-off-by: Andy Green <andy@warmcat.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2010-01-18 11:41:03 +09:00
Andy Green
a7c9194cdc ARM: S3C64XX: Add SROM register definitions
This introduces a platform file for s3c64xx that defines
the SROM unit registers that control chip select
characteristics.

Signed-off-by: Andy Green <andy@warmcat.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2010-01-18 11:41:03 +09:00
Ben Dooks
0084f27a21 ARM: Merge next-s3c64xx
Merge branch 'next-s3c64xx' into next-samsung

Conflicts:
	arch/arm/mach-s3c6400/include/mach/map.h
	( ADC and RTC PA merge fixed)
2010-01-18 09:35:29 +09:00
Maurus Cuelenaere
bcedfa98d9 ARM: S3C64XX: Add S3C64XX support to the generic Samsung ADC driver
Add S3C64XX support to the generic Samsung ADC driver

Signed-off-by: Maurus Cuelenaere <mcuelenaere@gmail.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2010-01-18 09:30:49 +09:00
Maurus Cuelenaere
3929e1e76d ARM: SAMSUNG: Move S3C24XX ADC driver to plat-samsung
Move S3C24XX ADC driver to plat-samsung

Signed-off-by: Maurus Cuelenaere <mcuelenaere@gmail.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2010-01-18 09:30:49 +09:00
Jassi Brar
71269364a8 ARM: S3C64XX: Add I2S resources in platform code
Define resources needed by the I2S drivers in platform code.
Audio cfg_gpio callback and IORESOURCE_DMA are added.

Signed-off-by: Jassi Brar <jassi.brar@samsung.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2010-01-18 08:47:21 +09:00
Maurus Cuelenaere
206090913d ARM: S3C64XX: Add S3C64XX RTC platform driver
Add S3C64XX RTC platform driver

Signed-off-by: Maurus Cuelenaere <mcuelenaere@gmail.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2010-01-18 08:47:21 +09:00
Ben Dooks
0f61628e37 ARM: S3C2412: Fixup commented out device in SMDK2413
The SMDK2413 has a commented out device that does not have any setup
data for it, so remove it for now.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2010-01-15 19:33:19 +09:00
Ben Dooks
b813248c61 ARM: S3C: Rename s3c_device_usb to s3c_device_ohci
Prepare for the forthcoming device changes by renaming s3c_device_usb to
s3c_device_ohci as this is what the device represents.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2010-01-15 19:33:19 +09:00
Kukjin Kim
501dae90b3 ARM: S5P6440: Add serial port support
This patch adds UART serial port support for S5P6440 CPU. Most of the
serial support of Samsung's 6400 CPU is reused for 6440 CPU.

Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2010-01-15 19:16:47 +09:00
Kukjin Kim
62a6156e88 ARM: S5P6440: Add configuration file
This patch adds Samsung's S5P6440 default configuration file.

Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2010-01-15 19:16:43 +09:00
Kukjin Kim
d25168ea93 ARM: S5P6440: Add Board support file
This patch adds Samsung's SMDK6440 board support file.

Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2010-01-15 19:16:36 +09:00
Kukjin Kim
c4ffccddd5 ARM: S5P6440: Add new Kconfig and Makefiles
This patch adds the Kconfig and Makefile for the new S5P6440 machine
and platform directories. It also updates arch/arm Kconfig and Makefiles
to include the support for the new S5P6440 CPU.

Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2010-01-15 19:16:32 +09:00
Kukjin Kim
5f3545f64a ARM: S5P6440: Add Timer support
This patch adds timer support for S5P6440 CPU.

Signed-off-by: Atul Dahiya <atul.dahiya@samsung.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2010-01-15 19:16:27 +09:00
Kukjin Kim
b7db51be43 ARM: S5P6440: Add IRQ support
This patch adds IRQ support for S5P6440 CPU.

Signed-off-by: Adityapratap Sharma <aditya.ps@samsung.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2010-01-15 19:16:21 +09:00
Kukjin Kim
1a0e8a52ad ARM: S5P6440: Add Clock and PLL support
This patch adds clock and pll support for S5P6440. This patch are based on
Harald Welte's patches and Ben's plat-samsung.

Signed-off-by: Thomas Abraham <thomas.ab@samsung.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2010-01-15 19:16:16 +09:00
Kukjin Kim
209fecd1b8 ARM: S5P6440: Add new CPU initialization support
This patch adds Samsung's S5P6440 CPU support.

Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2010-01-15 19:16:08 +09:00
Ben Dooks
be97162d47 ARM: S5PC1XX: Use common UART IRQ handling code
Use the common UART IRQ handling code for the S5PC100 system.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2010-01-15 17:10:16 +09:00
Ben Dooks
47101ec739 ARM: S5PC1XX: Move to using standard timer IRQ handling code
Move to using the standard VIC/Timer IRQ handling code added previously
to avoid duplicating code.

Thanks to Marek Szyprowski for pointing out dual Kconfig change.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2010-01-15 17:10:16 +09:00
Ben Dooks
35accd2f66 ARM: S5PC1XX: Remove definitions deleted by previous clksrc changes
Remove the definitions we've deleted in the previous updates to the
clksrc_clk for arch/arm/plat-s5pc1xx/include/plat/regs-clock.h.

Added comments about the removal to the clock header since we only need
these defines in one place (and they've now been removed there) we get
rid of them from the header.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2010-01-15 17:10:16 +09:00
Ben Dooks
c837e88cf9 ARM: S5PC1XX: Change clksrc_clks to use array of clocks
Remove the individual 'struct clksrc_clks' and place them into an array
so that we can simply use s3c_register_clksrcs to register tham all in one
go.

Since the spdif clock relies on the audio clock, move the audio clocks
into their own arrary.

Thanks to  Marek Szyprowski for testing and pointing out the four clocks
what where missed from the clock list.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2010-01-15 17:10:15 +09:00
Ben Dooks
1d026d9b16 ARM: S5PC1XX: Move clock definitions around ready to turn into clksrc arrays
Move the clock definitions around ready to turn the clocks into an array
of clocks and register them in one go.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2010-01-15 17:10:15 +09:00
Ben Dooks
4542646814 ARM: S5PC1XX: Move to using generic clksrc_clk for clock code
Remove the copy of the old s3c64xx struct clksrc_clk and use the new one
in plat-samsung. This eliminates a bug in the set_parent() call where it
failed to set the clk->parent after sucesfully updating the clock.

The script that was used to automate much of the process will be supplied
seperately.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2010-01-15 17:10:14 +09:00
Kukjin Kim
85841bcedd ARM: SAMSUNG: Add config option for number of additional GPIO pins.
This patch adds a configuration option for specifing the number
of additional GPIO pins to be used in addition to the GPIO pins
supported onchip.

Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2010-01-15 17:10:14 +09:00
Ben Dooks
5b39be4637 ARM: Add common entry code for system with two VICs
Add a common entry-macro-vic2.S for systems where there are two VICs
so that the machine or platform directories just need to setup the
correct information before including <asm/entry-macro-vic2.S> into
their own entry-macro.S file.

Since this code is from the S3C64XX project, we update the S3C64XX
machine entry code to use this new header.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2010-01-15 17:10:14 +09:00
Ben Dooks
51022cf659 ARM: SAMSUNG: Move IRQ UART handling for newer devices to plat-samsung
Move the handling for the UART interrupts out of the s3c64xx specific
code and into plat-samsung so that it can be used by all implementations
that need it.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2010-01-15 17:10:14 +09:00
Ben Dooks
7162ba0372 ARM: SAMSUNG: Move IRQ VIC timer handling out to common header files
Move the VIC based timer interrupt handling out of plat-s3c64xx and
into plat-samsung to be re-used for other systems. This also reduces
the code size as we now have a common init routine and use the irq_desc
to store the interrupt number of the timer.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2010-01-15 17:10:13 +09:00
Ben Dooks
4f830db962 ARM: SAMSUNG: Move gpio-config.c into plat-samsung
The arch/arm/plat-s3c/gpio-config.c file is common to pretty much all the Samsung
SoCs, so move it to arch/arm/plat-samsung

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2010-01-15 17:10:13 +09:00
Ben Dooks
b6a604137b ARM: SAMSUNG: Move device definitions in plat-samsung
Move all the platform device definitions from plat-s3c into plat-samsung

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2010-01-15 17:10:13 +09:00
Ben Dooks
9745626b65 ARM: SAMSUNG: Move pwm-clock code into plat-samsung
Move the code for the pwm-clock into plat-samsung, as it is common to
all Samsung SoCs.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2010-01-15 17:10:12 +09:00
Kukjin Kim
ed276849bc ARM: SAMSUNG: Make clk_default_setrate and clk_ops_def_setrate visible
This patch makes clk_default_setrate and clk_ops_def_setrate available
to code outside plat-samsung clock code.

Signed-off-by: Thomas Abraham <thomas.ab@samsung.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2010-01-15 17:10:12 +09:00
Ben Dooks
14235696d4 ARM: SAMSUNG: Do not register set_parent call if no source
If there is no source register defined, do not register a clksrc
clock with a valid .set_parent in the ops.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2010-01-15 17:10:11 +09:00
Ben Dooks
1d9f13c49e ARM: SAMSUNG: Add call to register array of clocks
Add s3c_register_clocks() to register an array of clocks, printing
an error message if there is a problem. Replace all points in the code
where this could be used.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2010-01-15 17:10:11 +09:00
Ben Dooks
fb6e76cd23 ARM: SAMSUNG: Do not allow get/set/round rate calls with no divider
If the reg_div field is not set, then do not register clk_ops with the
get/set/round rate calls as these will fail to work.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2010-01-15 17:10:11 +09:00
Ben Dooks
2c2f69b15d ARM: SAMSUNG: Move clock.c to arch/arm/plat-samsung
This is the core implementation of the clock code for all Samsung based
SoCs, so move it to arch/arm/plat-samsung (the clock.h file has already
been moved).

Since the file is built for every Samsung SoC, no changes are needed to the
Kconfig system.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2010-01-15 17:10:11 +09:00
Ben Dooks
682e2b7d45 ARM: S3C64XX: Avoid announcing clksrc clocks twice
The new code calls the clock setup code on registration which
can be before the clock system has been fully initialised. The
following code re-does this setup at the end of the clock
registration and thus we get two printings.

Update the calls to only print on the last pass or when doing
the necessary resume work.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2010-01-15 17:10:10 +09:00
Ben Dooks
f3e0b724cc ARM: S3C64XX: Fixup .reg_src and .reg_div with named initialisers
Change these two fields to have named initialisers as per the
review comments from Kyungmin Park.

sed used:

s@\.reg_src\(.*\)=\(.*\){\(.*\),\(.*\),\(.*\)}@.reg_src\1=\2{ .reg =\3, .shift =\4, .size =\5 }@g
s@\.reg_div\(.*\)=\(.*\){\(.*\),\(.*\),\(.*\)}@.reg_div\1=\2{ .reg =\3, .shift =\4, .size =\5 }@g

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2010-01-15 17:10:10 +09:00
Ben Dooks
b3bf41be06 ARM: SAMSUNG: Reduce size of struct clk.
Reduce the size of struct clk by 12 bytes and make defining clocks with
common implementation functions easier by moving the set_rate, get_rate,
round_rate and set_parent calls into a new structure called 'struct clk_ops'
and using that instead.

This change does make a few clocks larger as they need their own clk_ops,
but this is outweighed by the number of clocks with either no ops or having
a common set of ops.

Update all the users of this.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2010-01-15 17:10:10 +09:00
Harald Welte
13bbd88504 ARM: S3C64XX: Remove unused clock definitions from clock header
Clean out the definitions we are no longer using after the new clock
code updates.

Signed-off-by: Harald Welte <laforge@gnumonks.org>
[ben-linux@fluff.org: split from initial patch provided]
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2010-01-15 17:10:09 +09:00
Ben Dooks
399cae7474 ARM: S3C64XX: Use new clock-clksrc.c code for clocks.
Move the s3c6400-clock.c implementation over to use the new common
plat-samsung based clock-clksrc.c.

Note, this does not delete the clocks definitions that are now unused
in the regs-clock.h to reduce the quantity of change in this commit.

Based on original patches by Harald Welte.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2010-01-15 17:10:09 +09:00
Harald Welte
aa9ad6ad9c ARM: SAMSUNG: Add core clock implementation for clksrc based clocks
Add a core for the clksrc clock implementation, which is found in many of
the newer Samsung SoCs into plat-samsung.

Signed-off-by: Harald Welte <laforge@gnumonks.org>
[ben-linux@fluff.org: split from original patch to make change smaller]
[ben-linux@fluff.org: split clk and clksrc changes]
[ben-linux@fluff.org: moved to plat-samsung from plat-s3c]
[ben-linux@fluff.org: re-wrote headers after splits]
[ben-linux@fluff.org: added better documentation to headers]
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2010-01-15 17:10:09 +09:00
Ben Dooks
8360493c4a ARM: S3C64XX: Compress s3c6400-clock.c code
The individually named clocks are all static to the code
and thus can be compressed into a single array and then
the array can be referenced. This removes the need for
a seperate array of pointers to clocks.

Fix a minor problem of re-initialising the pointers in
s3c6400_set_clksrc() as this is also called by the cpufreq
code. Move these initialisations to the code that does the
registration.

Based on Harald Welte's original clock changes patch.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2010-01-15 17:10:08 +09:00
Ben Dooks
f9c4f1e4dd ARM: S3C64XX: Cleanup common init code in s3c6400-clock.c
Remove the four fields from clksrc_clk.clk which are always the same
and init them when the clock is registered. This helps remove the amount
of repeated code.

This is a re-work of Harald Welte's clock changes for the latest kernel.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2010-01-15 17:10:08 +09:00
Ben Dooks
70792bcfad ARM: SAMSUNG: Move <plat/clock.h> to plat-samsung
Move the <plat/clock.h> header to plat-samsung where it can be used by all
the platforms, and readies it for the next round of clock updates where
the clock code will be amalgamated.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2010-01-15 17:10:08 +09:00
Ben Dooks
3ce2f76f5d ARM: MINI2440: Fixup __initdata usage
Remove some of the __initdata tags which are currently inappropriate for
platform_device and some of the platform data. These can be returned once
support for copying platform devices and data is added.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2010-01-15 17:04:42 +09:00
Uri Yosef
0a3727ffb9 ARM: MINI2440: Fix crash on boot due to improper __initdata qualifier
This patch fix mini2440 crash on boot due to improper __initdata
qualifier on mini2440_led1_pdata.

Signed-off-by: Uri Yosef <uri.yosef@gmail.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2010-01-15 16:56:05 +09:00
Mark Brown
d3cf4489d5 ARM: SMDK6410: Specify no GPIO for B_PWR_5V regulator
Since the fixed voltage regulator grew support for GPIO based
enables and GPIO 0 is valid on some systems we need to specify
that there is no valid GPIO enable control.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2010-01-15 09:52:51 +09:00
Ramax Lo
9b96918a97 ARM: S3C: NAND: Check the existence of nr_map before copying
Since the structure field nr_map is optional, we need to check whether the
chip number map is provided to avoid unexpected NULL pointer exception.

Signed-off-by: Ramax Lo <ramaxlo@gmail.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2010-01-14 11:25:44 +09:00
Linus Torvalds
1f0e14bbc0 Merge master.kernel.org:/home/rmk/linux-2.6-arm
* master.kernel.org:/home/rmk/linux-2.6-arm:
  ARM: Ensure ARMv6/7 mm files are built using appropriate assembler options
  ARM: Fix wrong dmb
  ARM: 5874/1: serial21285: fix disable_irq-from-interrupt-handler deadlock
  ARM: 5873/1: ARM: Fix the reset logic for ARM RealView boards
  ARM: 5872/1: ARM: include needed linux/cpu.h in asm/cpu.h
  ARM: 5871/1: arch/arm: Fix build failure for lpd7a404_defconfig caused by missing includes
  ARM: 5870/1: arch/arm: Fix build failure for defconfigs without CONFIG_ISA_DMA_API set
  ARM: 5868/1: ARM: fix "BUG: using smp_processor_id() in preemptible code"
  ARM: 5867/1: Update U300 defconfig
  ARM: 5866/1: arm ptrace: use unsigned types for kernel pt_regs
  [ARM] pxa: fix strange characters in zaurus gpio .desc
  ARM: add missing recvmmsg syscall number
  [ARM] pxa: fix compiler warnings of unused variable 'id' in cpu_is_pxa9*()
  [ARM] pxa: update pwm_backlight->notify() to include missed 'struct device *'
  [ARM] pxa: enable L2 if present in XSC3
  [ARM] pxa: do not enable L2 after MMU is enabled
2010-01-12 20:56:01 -08:00
Russell King
aff7b4f867 ARM: Ensure ARMv6/7 mm files are built using appropriate assembler options
A kernel with both ARMv6 and ARMv7 selected results in build errors.
Fix this by specifying the proper architectures for these assembly
files.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2010-01-12 19:02:05 +00:00
Russell King
7511bce406 ARM: Fix wrong dmb
The __kuser_cmpxchg code uses an ARMv6 dmb instruction, rather than
one based upon the architecture being built for.  Switch to using
the macro provided for this purpose, which also eliminates the
need for an ifdef.

Acked-by: Nicolas Pitre <nico@fluxnic.net>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2010-01-12 18:59:16 +00:00
Linus Torvalds
c0f607c608 Merge branch 'omap-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6
* 'omap-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6: (26 commits)
  OMAP2 clock: dynamically allocate CPUFreq frequency table
  OMAP clock/CPUFreq: add clk_exit_cpufreq_table()
  OMAP2xxx OPP: clean up comments in OPP data
  OMAP2xxx clock: clk2xxx.c doesn't compile if CPUFREQ is enabled
  OMAP1 clock: remove __initdata from struct clk_functions to prevent crash
  OMAP1 clock: Add missing clocks for OMAP 7xx
  OMAP clock: remove incorrect EXPORT_SYMBOL()s
  OMAP3 clock: Add capability to change rate of dpll4_m5_ck
  OMAP3 clock: McBSP 2, 3, 4 functional clock parent is PER_96M_FCLK, not CORE_96M_FCLK
  OMAP3: clock: add clockdomains for UART1 & 2
  OMAP2420 IO mapping: move IVA mapping virtual address out of vmalloc space
  OMAP2xxx IO mapping: mark DSP mappings as being 2420-only
  ARM: OMAP3: PM: Fix the Invalid CM_CLKSTCTRL reg access.
  OMAP2: remove duplicated #include
  omap3: EVM: Choose OMAP_PACKAGE_CBB
  omap3: Fix booting if package is uninitialized
  omap3: add missing parentheses
  omap3: add missing parentheses
  omap2/3: ZOOM: Correcting key mapping for few keys
  omap2/3: make serial_in_override() address the right uart port
  ...
2010-01-11 09:44:19 -08:00
Albin Tonnerre
e7db7b4270 arm: add support for LZO-compressed kernels
- changes to ach/arch/boot/Makefile to make it easier to add new
   compression types
 - new piggy.lzo.S necessary for lzo compression
 - changes in arch/arm/boot/compressed/misc.c to allow the use of lzo or
   gzip, depending on the config
 - Kconfig support

Signed-off-by: Albin Tonnerre <albin.tonnerre@free-electrons.com>
Tested-by: Wu Zhangjin <wuzhangjin@gmail.com>
Acked-by: "H. Peter Anvin" <hpa@zytor.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Thomas Gleixner <tglx@linutronix.de>
Tested-by: Russell King <rmk@arm.linux.org.uk>
Acked-by: Russell King <rmk@arm.linux.org.uk>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Martin Michlmayr <tbm@cyrius.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-01-11 09:34:05 -08:00
Andreas Fenkart
4b529401c5 mm: make totalhigh_pages unsigned long
Makes it consistent with the extern declaration, used when CONFIG_HIGHMEM
is set Removes redundant casts in printout messages

Signed-off-by: Andreas Fenkart <andreas.fenkart@streamunlimited.com>
Acked-by: Russell King <rmk+kernel@arm.linux.org.uk>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: David Howells <dhowells@redhat.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Chen Liqin <liqin.chen@sunplusct.com>
Cc: Lennox Wu <lennox.wu@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-01-11 09:34:03 -08:00
Colin Tuckley
4c9f8be7da ARM: 5873/1: ARM: Fix the reset logic for ARM RealView boards
Extend the patch from Philby John to the other "RealView" boards.
Rename the constants and offsets to reflect their actual functions.

Cc: Philby John <pjohn@in.mvista.com>
Signed-off-by: Colin Tuckley <colin.tuckley@arm.com>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2010-01-11 15:39:21 +00:00
Santosh Shilimkar
62a8c5bcb5 ARM: 5872/1: ARM: include needed linux/cpu.h in asm/cpu.h
The file arch/arm/include/asm/cpu.h needs to include 'linux/cpu.h' to
meet its dependency. Otherwise when using "struct cpuinfo_arm" and
including just 'asm/cpu.h' throws below error -
	arch/arm/include/asm/cpu.h:16: error: field 'cpu' has incomplete type

To fix this  otherway, one can also include both linux/cpu.h and
asm/cpu.h but it shoudn't be that way.  So this patch fixes this by
including the linux/cpu.h in asm/cpu.h, so that including alone
asm/cpu.h is enough.

Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2010-01-10 13:03:52 +00:00
Peter Hüwe
657b366a28 ARM: 5871/1: arch/arm: Fix build failure for lpd7a404_defconfig caused by missing includes
This patch fixes a build failure [1] due to missing includes
This should make the arm tree build again with lpd7a404_defconfig

References:
http://kisskb.ellerman.id.au/kisskb/buildresult/1983329/

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2010-01-10 00:08:14 +00:00
Peter Hüwe
f892027c02 ARM: 5870/1: arch/arm: Fix build failure for defconfigs without CONFIG_ISA_DMA_API set
A lot of ARM-defconfigs (those without CONFIG_ISA_DMA_API set) fail to
build [1][2][3] due to the changes of the patch
    [PATCH] PCI: Clean up build for CONFIG_PCI_QUIRKS unset
    by Rafael J. Wysocki (Sat, 2 Jan 2010 22:57:24 +0100) [4]
as the referenced variable 'isa_dma_bridge_buggy' in asm/dma.h is
enclosed by the CONFIG_ISA_DMA_API conditional all configs without this
setting fail to build.

I'm not sure wether moving the condition is the right way to solve the
issue, but atleast it fixes the issue :)

References:
[1] http://kisskb.ellerman.id.au/kisskb/buildresult/1983354/
[2] http://kisskb.ellerman.id.au/kisskb/buildresult/1983333/
[3] http://kisskb.ellerman.id.au/kisskb/buildresult/1983337/
[4] http://lkml.org/lkml/2010/1/2/102

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2010-01-10 00:08:03 +00:00
Tony Lindgren
27dba4bcf8 Merge branch 'for_2.6.33rc_c' of git://git.pwsan.com/linux-2.6 into omap-fixes-for-linus 2010-01-08 14:27:56 -08:00
Paul Walmsley
cdf1a91556 OMAP2 clock: dynamically allocate CPUFreq frequency table
Dynamically allocate the CPUFreq frequency table on OMAP2xxx chips.
This fixes some compilation problems, since the kernel may not know
what chip it is running on until boot-time.  This also reduces the size
of the CPUFreq frequency table.

Problem originally reported by Felipe Balbi <felipe.balbi@nokia.com>.
Thanks also for comments on the patch from Felipe and Kevin.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Cc: Felipe Balbi <felipe.balbi@nokia.com>
Cc: Kevin Hilman <khilman@deeprootsystems.com>
2010-01-08 15:23:17 -07:00
Paul Walmsley
4e37c10d8a OMAP clock/CPUFreq: add clk_exit_cpufreq_table()
A subsequent patch adds code on OMAP2xxx to dynamically allocate the
CPUFreq frequency table in clk_init_cpufreq_table(), so for it to
avoid a leak, it will need a corresponding function to free the
memory.  This patch adds clk_exit_cpufreq_table() with generic
code to call a chip-specific variant inside the clockfw_lock spinlock via
struct clk_functions.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
2010-01-08 15:23:16 -07:00
Paul Walmsley
ca6eccb31e OMAP2xxx OPP: clean up comments in OPP data
Revise some of the comments in the OMAP2xxx OPP data for clarity.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Cc: Richard Woodruff <r-woodruff2@ti.com>
2010-01-08 15:23:15 -07:00
Felipe Balbi
19fe458310 OMAP2xxx clock: clk2xxx.c doesn't compile if CPUFREQ is enabled
if we enable CPUFREQ we can't build omap2 for two reasons,
one of them is fixed by the patch below.

It's failing because the __must_be_array() check in
ARRAY_SIZE() is failing and printing the following message:

arch/arm/mach-omap2/clock2xxx.c:453: error: negative width in bit-field '<anonymous>'

Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
[paul@pwsan.com: commit message updated; changed rate variable name]
Signed-off-by: Paul Walmsley <paul@pwsan.com>
2010-01-08 15:23:15 -07:00
Cory Maccarrone
9b11769f99 OMAP1 clock: remove __initdata from struct clk_functions to prevent crash
Commit 52650505fb added an __initdata
decoration to the structure containing the clk_enable and clk_disable
functions.  Once init data was freed, these pointers went to null, and
the next enable or disable call caused the kernel to crash.  This
change removes this decoration.

Signed-off-by: Cory Maccarrone <darkstar6262@gmail.com>
[paul@pwsan.com: patch manually split and commit message edited]
Signed-off-by: Paul Walmsley <paul@pwsan.com>
2010-01-08 15:23:14 -07:00
Cory Maccarrone
e8ae6b6e4d OMAP1 clock: Add missing clocks for OMAP 7xx
This change adds in some missing clocks that were needed as a result
of 526505... (OMAP1 clock: convert mach-omap1/clock.h to
mach-omap1/clock_data.c).  Prior to this, it was just assumed that
these clocks existed for all devices, and it was used directly instead
of calling it out with a clock_get call or similar.  So, not having
the CK_7XX meant these clocks weren't being used anymore for omap 7xx
devices, which broke things badly.

Signed-off-by: Cory Maccarrone <darkstar6262@gmail.com>
[paul@pwsan.com: commit message edited]
Signed-off-by: Paul Walmsley <paul@pwsan.com>
2010-01-08 15:23:10 -07:00
Paul Walmsley
d1e6249821 OMAP clock: remove incorrect EXPORT_SYMBOL()s
The only symbols that should be exported are symbols that are to be
called from loadable kernel modules, e.g., device drivers.  In the
context of plat-omap/clock.c, these should only be the Linux clock
interface symbols as defined by include/linux/clk.h.  Core code
doesn't need these symbols to be exported.  Also, clean up an old
comment while here.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
2010-01-08 15:23:09 -07:00