S3C2416, S3C2443 and S3C2450 includes a USB High-Speed Gadget controller module.
This patch adds the following for supporting this controller.
1. Definition for USB High-Speed controller base address.
2. Platform device instantiation.
3. Declaration for platform data structure.
4. Functionality to setup platform data for the controller.
Signed-off-by: Thomas Abraham <thomas.ab@samsung.com>
Signed-off-by: Sangbeom Kim <sbkim73@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Currently all boards using the s3c2410_udc driver use a GPIO to control the
state of the pullup, as a result the same code is reimplemented in each board
file.
This patch adds support for using a GPIO to control the pullup state to the udc
driver, so the boards can use a common implementation.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Currently the {set,get}_pull callbacks of the s3c24xx_gpiocfg_default structure
are initalized via s3c_gpio_{get,set}pull_1up. This results in a linker
error when only CONFIG_CPU_S3C2442 is selected:
arch/arm/plat-s3c24xx/built-in.o:(.data+0x13f4): undefined reference to
`s3c_gpio_getpull_1up'
arch/arm/plat-s3c24xx/built-in.o:(.data+0x13f8): undefined reference to
`s3c_gpio_setpull_1up'
The s3c2442 has pulldowns instead of pullups compared to the s3c2440.
The method of controlling them is the same though.
So this patch modifies the existing s3c_gpio_{get,set}pull_1up helper functions
to take an additional parameter deciding whether the pin has a pullup or pulldown.
The s3c_gpio_{get,set}pull_1{down,up} functions then wrap that functions passing
either S3C_GPIO_PULL_UP or S3C_GPIO_PULL_DOWN.
Furthermore this patch sets up the s3c24xx_gpiocfg_default.{get,set}_pull fields
in the s3c244{0,2}_map_io function to the new pulldown helper functions.
Based on patch from "Lars-Peter Clausen" <lars@metafoo.de>
Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Add basic clock support for the PLLs, HSMMC channels and
PWM clocks. This is enough to get a basic system up and
running.
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
To share code with some of the newer parts such as the S3C2416, move
parts of arch/arm/mach-s3c2443/clock.c to a common file called
arch/arm/plat-s3c24xx/s3c2443-clock.c.
Update the build configuration to deal with this new file.
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Add arch/arm/mach-s3c2416 for support of the Samsung S3C2416 SoC.
This patch adds support of the S3C2416 SoC, clocks, timers,
and initial IRQ support (without support of secondary set of registers).
Signed-off-by: Yauhen Kharuzhy <jekhor@gmail.com>
[ben-linux@fluff.org: removed files to be reworked, fixed conflicts]
[ben-linux@fluff.org: use s3c2443 reset instead of specific reset code]
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (56 commits)
doc: fix typo in comment explaining rb_tree usage
Remove fs/ntfs/ChangeLog
doc: fix console doc typo
doc: cpuset: Update the cpuset flag file
Fix of spelling in arch/sparc/kernel/leon_kernel.c no longer needed
Remove drivers/parport/ChangeLog
Remove drivers/char/ChangeLog
doc: typo - Table 1-2 should refer to "status", not "statm"
tree-wide: fix typos "ass?o[sc]iac?te" -> "associate" in comments
No need to patch AMD-provided drivers/gpu/drm/radeon/atombios.h
devres/irq: Fix devm_irq_match comment
Remove reference to kthread_create_on_cpu
tree-wide: Assorted spelling fixes
tree-wide: fix 'lenght' typo in comments and code
drm/kms: fix spelling in error message
doc: capitalization and other minor fixes in pnp doc
devres: typo fix s/dev/devm/
Remove redundant trailing semicolons from macros
fix typo "definetly" -> "definitely" in comment
tree-wide: s/widht/width/g typo in comments
...
Fix trivial conflict in Documentation/laptops/00-INDEX
Continue the clearout of plat-s3c by moving audio-simtec.h to plat-s3c24xx
as there are no current implementations outside of this platform.
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
dma-plat.h is the last file left in plat-s3c64xx, but to remove it we
must also change the use of dma-plat.h by the core code and the s3c24xx
implementation.
Rename the s3c24xx dma-plat.h in the common plat-samsung directory as it
may be used for other ports. Move the specific dma bits into the
mach-s3c64xx directory and update the build as needed.
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
In particular, several occurances of funny versions of 'success',
'unknown', 'therefore', 'acknowledge', 'argument', 'achieve', 'address',
'beginning', 'desirable', 'separate' and 'necessary' are fixed.
Signed-off-by: Daniel Mack <daniel@caiaq.de>
Cc: Joe Perches <joe@perches.com>
Cc: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Merge these two headers into one, these two SoCs are so similar.
Note, correct fault in mach-smdk2443.h including the wrong header.
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Remove the old common S3C2440 and S3C2442 SoC support from plat-s3c24xx
into mach-s3c2440 now this directory is serving both SoCs.
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
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>
There are a number of statements of the form A, B or A, B, C where
the numbers A,B,C are not consecutive. However, referencing [1] it
is the correct thing to replace these with A-B or A-C as apropriate.
[1] http://www.copyrightservice.co.uk/copyright/p03_copyright_notices
section 4iii 'Year of publication'
Signed-off-by: Ben Dooks <ben@simtec.co.uk>
Signed-off-by: Simtec Linux Team <linux@simtec.co.uk>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Add documentation for the platform data structure in the SD/MMC driver
header file arch/arm/plat-s3c24xx/include/plat/mci.h.
Signed-off-by: Ben Dooks <ben@simtec.co.uk>
Signed-off-by: Simtec Linux Team <linux@simtec.co.uk>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Fix the link errors if cpu-frequency support is enabled on s3c2410 systems
but there is no CONFIG_S3C2410_IOTIMING set. Fix this by ensuring the
relevant symbols are defined NULL if the code is not being built in.
Fixes the following error:
arch/arm/mach-s3c2410/built-in.o: undefined reference to `s3c2410_iotiming_get'
arch/arm/mach-s3c2410/built-in.o: undefined reference to `s3c2410_iotiming_set'
arch/arm/mach-s3c2410/built-in.o: undefined reference to `s3c2410_iotiming_calc'
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Define a macro to avoid the following error during kernel build process
for platforms other than s3c2410:
arch/arm/plat-s3c24xx/cpu.c:84: error: ‘s3c2410a_init’ undeclared here (not in a function)
Signed-off-by: Ramax Lo <ramaxlo@gmail.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Add better support for omitting either the card detect or the write
protect GPIOs if the board does not support it. Add the fields
no_wprotect and no_detect to the platform data which when set indicate the
absence of the respective GPIOs.
Note, this also fixes a minor bug where it tries to free IRQ0 if there is
no detect gpio available.
Signed-off-by: Ben Dooks <ben@simtec.co.uk>
Cc: <linux-mmc@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Add a selection for the data transfer mode of the s3cmci driver, allowing
for either a configuration or rumtime selection of the use of the DMA or
PIO transfer code.
The PIO only mode is 476 bytes smaller than the driver with both methods
compiled in.
Signed-off-by: Ben Dooks <ben@simtec.co.uk>
Cc: <linux-mmc@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Add support for routing an IRQ from the normal ARM IRQ mechanism to the
FIQ input of the processor.
Note, also fix a bug where the init_FIQ() function has not been called
when CONFIG_FIQ is enabled.
Signed-off-by; Ben Dooks <ben@simtec.co.uk>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Add debugfs support for the cpufreq driver to allow
information about the system state to be exported to
the user.
Signed-off-by: Ben Dooks <ben@simtec.co.uk>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Add a sysdev S3C2410A sysdev to allow the differentiation
of the S3C2410A from the S3C2410. This is needed for the
CPUFREQ code to enable the extra features and update cpu
specific information.
Signed-off-by: Ben Dooks <ben@simtec.co.uk>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Move the structure s3c_cpufreq_config from cpu-freq.h to the
less advertised cpu-freq-core.h as it is not needed by anything
outside the core drivers.
Signed-off-by: Ben Dooks <ben@simtec.co.uk>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Add the core of the support for enabling the CPUFreq driver on
all S3C24XX based systems.
Signed-off-by: Ben Dooks <ben@simtec.co.uk>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Add a simple debug message on saving the UART state and add a per-arch
pre-restore function to be used by the s3c64xx restore code to ensure
the UARTs control registers do not go through any illegal state changes.
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
The USB host base address is available on both the S3C24XX and S3C64XX
ranges.
Signed-off-by: Ben Dooks <ben@simtec.co.uk>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Change the name of S3C2410_DMA_CHANNELS to S3C_DMA_CHANNELS in the process.
Signed-off-by: Ben Dooks <ben@simtec.co.uk>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
The <plat/dma-regs.h> pre-date the invention of the TAB character,
so fix the indentation of the register defines.
Signed-off-by: Ben Dooks <ben@simtec.co.uk>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
The <mach/dma.h> is for the driver API for the DMA system and should
not have anything relying on the CPU specific registers.
Remove the registers to <plat/dma-regs.h> for the code that really
needs to know about them.
Signed-off-by: Ben Dooks <ben@simtec.co.uk>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Move the platform dma.h to dma-plat.h to ensure it doen't get
confused with plat/dma.h
Signed-off-by: Ben Dooks <ben@simtec.co.uk>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Change the way the UART state is saved over suspend to allow the s3c64xx
code to modify the settings on resume to avoid any illegal state changes
to the UART clocks. This will also allow us to save the UDIVSLOT register
on newer SoCs.
Move to using a structure for the UART use the extant Kconfig configuration
specifying the number of UARTs.
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Move the IRQ_EINT sleep control to be available to all
s3c impelmentations. Since s3c_irqext_wake is not large,
place it in arch/arm/plat-s3c/pm.c as adding it to a new
file would be a waste of compile time.
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Split the PM code out of arch/arm/plat-s3c24xx/irq.c to
remove some of the #ifdefs being used. Also fix a couple
of places where the absecnce of a function was redefined
to the same thing.
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Move the <plat/pm.h> header to plat-s3c as preparation
for moving parts of the s3c24xx pm support which are
common into the plat-s3c support.
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Move the IIS headers to their correct place.
Signed-off-by: Ben Dooks <ben@simtec.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
The S3C64XX series has a new TCFG divider setting to allow the clock
directly through, which means that we need to update the pwm-clock
code to cope with this.
Add <mach/pwm-clock.h> containing the specific code to deal with the
TCFG divider settings and provide any other per-arch data that the
pwm-clock driver needs to function.
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Split the map.h definitions into common S3C24XX code by
adding arch/arm/plat-s3c24xx/include/plat/map.h and
altering the machine specific header for the S3C24A0.
As we add a new <plat/map.h> we move the original one
in arch/arm/plat-s3c include directory to be called
map-base.h to distinguish the two files.
Signed-off-by: Ben Dooks <ben-linux@fluff.org>