Remove the s3c2410_gpio_irq2pin() function as it is not being
used in any in kernel driver and the function is probably not
being used anywhere else.
This is also part of the effort to remove any of the s3c24xx gpio
specific code that cannot be recreated by using the gpiolib
framework now in the kernel.
Signed-off-by: Ben Dooks <ben@simtec.co.uk>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
The BAST support code is calling s3c_i2c0_set_platdata() from
the map_io() entry, instead of the bast_init() code. This causes
the registration to fail due to kmalloc() not being available
at the time.
This fixes the following error:
s3c_i2c0_set_platdata: no memory for platform data
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>
Add common definition for USB OHCI platform device, add a Kconfig
to selectively compile it and add update all the users.
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 dma.h header does not need to include <mach/hardware.h> as there
is nothing it depends on. Remove the include and fixup the couple of
places where <mach/map.h> was not explicitly included (dragged in
via <mach/hardware.h>)
Note, we have to fix arch/arm/plat-s3c24xx/pm.c which seems to rely
on having <mach/hardware.h> included by this method.
Signed-off-by: Ben Dooks <ben@simtec.co.uk>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Move the common information from the <mach/dma.h> header into a new
shareable <plat/dma.h> header for re-use on the s3c64xx.
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>
calls
The S3C24XX DMA API channel configuration registers are being passed
values comprised of register values which makes it hard to move the
API to cover both the S3C24XX and S3C64XX.
These values can be calculated from knowing which device the channel
is connected to, so remove them from the two calls s3c2410_dma_config
and s3c2410_dma_devconfig.
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>
The platform data for the i2c-s3c2410 driver used to allow a min,
max and desired frequency for the I2C bus. This patch reduces it
to simply a desired frequency ceiling and corrects all the uses
of the platform data appropriately.
This means, for example, that on a system with a 66MHz fclk, a
request for 100KHz will achieve 65KHz which is safe and
acceptable, rather than 378KHz which it would have achieved
without this change.
Signed-off-by: Simtec Linux Team <linux@simtec.co.uk>
Signed-off-by: Daniel Silverstone <dsilvers@simtec.co.uk>
[ben-linux@fluff.org: tidy subject and description]
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6: (97 commits)
USB: qcserial: add device id for HP devices
USB: isp1760: Add a delay before reading the SKIPMAP registers in isp1760-hcd.c
USB: allow malformed LANGID descriptors
USB: pxa27x_udc: typo fixes and code cleanups
USB: gadget: gadget zero uses new suspend/resume hooks
USB: gadget: composite device-level suspend/resume hooks
USB: r8a66597-hcd: suspend/resume support
USB: more u32 conversion after transfer_buffer_length and actual_length
USB: Fix cp2101 USB serial device driver termios functions for console use
USB: CP2101 New Device ID
USB: ipaq: handle 4 endpoint devices
USB: S3C: Move usb-control.h to platform include
USB: ohci-hcd: Add ARCH_S3C24XX to the ohci-s3c2410.c glue
USB: pedantic: spelling correction in comment for ch9.h
USB: host: fix sparse warning: Using plain integer as NULL pointer
USB: ohci-s3c2410: fix name of bus clock
USB: ohci-s3c2410: remove <mach/hardware.h> include
USB: serial: rename cp2101 driver to cp210x
USB: CP2101 Reduce Error Logging
USB: CP2101 Support AN205 baud rates
...
The usb-control.h is needed by ohci-s3c2410.c for both S3C24XX and S3C64XX
architectures, so move it to <plat/usb-control.h>
Signed-off-by: Ben Dooks <ben@simtec.co.uk>
Cc: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
OMAP wishes to pass state to the boot loader upon reboot in order to
instruct it whether to wait for USB-based reflashing or not. There is
already a facility to do this via the reboot() syscall, except we ignore
the string passed to machine_restart().
This patch fixes things to pass this string to arch_reset(). This means
that we keep the reboot mode limited to telling the kernel _how_ to
perform the reboot which should be independent of what we request the
boot loader to do.
Acked-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
These changes were included in the S3C audio header move but are not
directly related to it.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Add the definition for S3C_GPIO_END to allow the PM code to build.
This means moving the GPIO bank numbers to a separate file to allow
the gpio and regs-gpio to include them. Including regs-gpio.h into
gpio.h causes too many build problems and adding gpio.h would mean
editing a large number of files.
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Rename s3c2410_cpu_resume to s3c_cpu_resume and s3c2410_cpu_save to
s3c_cpu_save to remove the CPU specific naming of these functions
which are now in the generic PM code.
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Since we have moved a large proportion of the PM code to the common
support area, remove the cpu specific name from the initialisation
function.
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
There's a bug in calculation of IRQ_EINT_BIT introduced on the test
branch for pm changes for s3c by Ben Dooks fixed in this patch.
There's also a bit of a mystery about how wake gets to wake EINT
set of interrupts, I added a couple of lines that make it work for
EINT4+ but not sure what's meant to be there for EINT0-3.
Still, this gets GTA02 resume working again.
Signed-off-by: Andy Green <andy@openmoko.com>
[ben-linux@fluff.org: remove irq-pm.c change]
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>
Start moving the PM code by moving all the common support functions
to a common location in arch/arm/plat-s3c. With the move we rename
the functions from s3cxxx_ to s3c_ to fit the new location.
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
The <mach/audio.h> file needs to be common to both ARCH_S3C2410 and
ARCH_S3C64XX as they share common driver code, so move it to <plat/audio.h>.
Signed-off-by: Ben Dooks <ben@simtec.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
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>
arch/arm/mach-at91/at91cap9.c:337: error: 'NR_AIC_IRQS' undeclared here (not in a function)
arch/arm/mach-at91/at91rm9200.c:301: error: 'NR_AIC_IRQS' undeclared here (not in a function)
arch/arm/mach-at91/at91sam9260.c:351: error: 'NR_AIC_IRQS' undeclared here (not in a function)
arch/arm/mach-at91/at91sam9261.c:287: error: 'NR_AIC_IRQS' undeclared here (not in a function)
arch/arm/mach-at91/at91sam9263.c:312: error: 'NR_AIC_IRQS' undeclared here (not in a function)
arch/arm/mach-at91/at91sam9rl.c:304: error: 'NR_AIC_IRQS' undeclared here (not in a function)
arch/arm/mach-h720x/h7202-eval.c:38: error: implicit declaration of function 'IRQ_CHAINED_GPIOB'
arch/arm/mach-ks8695/devices.c:46: error: 'KS8695_IRQ_WAN_RX_STATUS' undeclared here (not in a function)
arch/arm/mach-msm/devices.c:28: error: 'INT_UART1' undeclared here (not in a function)
arch/arm/mach-mx2/devices.c:233: error: 'MXC_GPIO_IRQ_START' undeclared here (not in a function)
arch/arm/mach-mx3/devices.c:128: error: 'MXC_GPIO_IRQ_START' undeclared here (not in a function)
arch/arm/mach-omap1/mcbsp.c:140: error: 'INT_730_McBSP1RX' undeclared here (not in a function)
arch/arm/mach-omap1/mcbsp.c:165: error: 'INT_McBSP1RX' undeclared here (not in a function)
arch/arm/mach-omap1/mcbsp.c:200: error: 'INT_McBSP1RX' undeclared here (not in a function)
arch/arm/mach-omap2/board-apollon.c:286: error: implicit declaration of function 'omap_set_gpio_direction'
arch/arm/mach-omap2/mcbsp.c:154: error: 'INT_24XX_MCBSP1_IRQ_RX' undeclared here (not in a function)
arch/arm/mach-omap2/mcbsp.c:181: error: 'INT_24XX_MCBSP1_IRQ_RX' undeclared here (not in a function)
arch/arm/mach-pxa/e350.c:36: error: 'IRQ_BOARD_START' undeclared here (not in a function)
arch/arm/plat-s3c/dev-i2c0.c:32: error: 'IRQ_IIC' undeclared here (not in a function)
...
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Change the spi_s3c2410 driver to use the generic gpio calls that are now
available.
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
As per Russell King's last review comment, find and remove
all unnecessary includes of <linux/delay.h> in the files
that do not need them.
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Add the fourth UART definition for the S3C2443, and at the
same time fixup the problems caused by the enlarging of the
UART array in the previous commits.
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Move the definition for the hsmmc device to plat-s3c
to be shared between the s3c24xx and s3c64xx platforms.
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Split the timer pending code out to a seperate per-machine
header so that when compiling for mach-s3c2410 or mach-s3c24a0
we can use the right timer code without having to #ifdef the
timer driver.
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>
The definition of S3C24XX_VA_GPIO used S3C2410_PA_GPIO
where it should have read S3C24XX_PA_GPIO.
Signed-off-by: Sandeep Patil <sandeep.patil@azingo.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Update the clock settings on resume for suspend/resume
support so that if the boot loader changes anything or
the system's PLL is reset then we return with the correct
settings.
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Move the PLL calculation code into it's own header
file for re-use with the other plat-s3c24xx based
systems such as the S3C24A0.
Note, we change the name of s3c2410_get_pll to the
more generically named s3c24xx_get_pll as well as
the related defintions.
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Only certain boards need these clocks, and they are not
available on some CPUs (such as the S3C24A0) so remove
them from arch/arm/plat-s3c24xx/clock.c and into their
own file with appropriate Kconfig entries.
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
We need to add plat-s3c to the build to get the headers
that will go in here once moved from include/asm-arm so
we may as well put some useful common s3c code in here
to stop the errors generated form having nothing built.
The cpu setup is now passed the cpu idcode and the table
of supported cpus to s3c_init_cpu() to abstract the
cpu identification out of the initial io setup.
As well as moving the cpu initialisation code, we move the
map of the board specific items up to the calling code as
none of the map_io() functions actually do anything other
than pass this to iotable_init().
This patch does not rename any of the init functions that
will be common to s3c24xx and any other s3c architectures
as this can be done at a later date as it will touch all
the board support files which use functions such as
s3c24xx_init_clocks() and s3c24xx_init_uarts().
Note, the header arch/arm/plat-s3c24xx/include/plat/cpu.h
still has functions that are used by both the cpu and
board initialisation functions. This means that each board
has definitions specific to the cpu support included and
the vice-versa.
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
vmalloc.h is common across all the current s3c platforms,
so move it to arch/arm/plat-s3c/include/mach to be used
for all the targets.
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Move <mach/timex.h> to arch/arm/plat-s3c/include/mach/timex.h
so it can be the default for all S3C based architectures.
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Move the S3C2410 base clock list to arch/arm/plat-s3c24xx
as this code is common to the S3C2410, S3C2440 and S3C2442
cpus.
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Add a set of default pin configuration routines for
setting up the SPI gpio configuration when using the
hardware SPI driver.
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
The spi master driver must have num_chipselect set to allow the bus to
initialise. Pass this through the platform data.
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
When ISA_DMA_API is unset, we're not implementing the ISA DMA API,
so there's no point in publishing the prototypes via asm/dma.h, nor
including the machine dependent parts of that API.
This allows us to remove a lot of mach/dma.h files which don't contain
any useful code. Unfortunately though, some platforms put their own
private non-ISA definitions into mach/dma.h, so we leave these behind
and fix the appropriate #include statments.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Since 8d5796d2ec, we have allowed
PAGE_OFFSET to be configurable, so a constant virtual address
for MAX_DMA_ADDRESS is buggy. It should be defined in terms of
PAGE_OFFSET rather than a constant virtual address.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Move the definition of MAX_DMA_ADDRESS from mach/dma.h to mach/memory.h,
thereby placing it along side its relative, ISA_DMA_THRESHOLD.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Let's provide an overridable default instead of having every machine
class define __virt_to_bus and __bus_to_virt to the same thing. What
most platforms are using is bus_addr == phys_addr so such is the default.
One exception is ebsa110 which has no DMA what so ever, so the actual
definition is not important except only for proper compilation. Also
added a comment about the special footbridge bus translation.
Let's also remove comments alluding to set_dma_addr which is not
(and should not) be commonly used.
Signed-off-by: Nicolas Pitre <nico@marvell.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Rather than:
config CPU_BLAH
bool
depends on ARCH_FOO || MACH_BAR
default y if ARCH_FOO || MACH_BAR
arrange for ARCH_FOO and MACH_BAR to select CPU_BLAH directly.
Acked-by: Nicolas Pitre <nico@marvell.com>
Acked-by: Andrew Victor <linux@maxim.org.za>
Acked-by: Brian Swetland <swetland@google.com>
Acked-by: Eric Miao <eric.miao@marvell.com>
Acked-by: Nicolas Bellido <ml@acolin.be>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Move plat/regs-spi.h to arch/arm/plat-s3c/include/plat ready
ready to clean out old include directories.
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Move the udc headers to the proper home in
arch/arm/plat-s3c24xx/include/plat ready to clean out
the old include directories.
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Add a pin configuration callback for the s3c24xx SPI driver, as there are
several options depending on the channel and the chip in use.
This is needed as the controller may not have been setup by the initial
bootloader and the fact that the SPI controller gets reset over
suspend/resume into slave mode but the GPIO function registers do not.
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
desc_handle_irq() was declared as obsolete since long ago.
Replace it with generic_handle_irq()
Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
First move of items out of include/asm-arm/plat-s3c* to their
new homes under arch/arm/plat-s3c/include/plat and
arch/arm/plat-s3c24xx/include/plat directories.
Note, we have to create a dummy arch/arm/plat-s3c/Makefile to
allow us to add arch/arm/plat-s3c/include/plat to the path.
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Fix the S3C2443 clock register definitions for selecting the EPLL
reference clock described by S3C2443_CLKSRC_EPLLREF.
Signed-off-by: Wei Shuai <cpuwolf@gmail.com>
[ben-linux@fluff.org: minor description fixes]
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Fix the following sparse errors in arch/arm/mach-s3c2410/nor-simtec.c:
53:27: warning: symbol 'simtec_nor_pdata' was not declared. Should it be static?
77:13: warning: symbol 'nor_simtec_init' was not declared. Should it be static?
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
This patch removes CVS keywords that weren't updated for a long time.
Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Remove includes of asm/hardware.h in addition to asm/arch/hardware.h.
Then, since asm/hardware.h only exists to include asm/arch/hardware.h,
update everything to directly include asm/arch/hardware.h and remove
asm/hardware.h.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Any data being passed to s3c243xx_clock_register() can be
marked as __initdata as it is an array of pointers to
'struct clk' that are to be registered on initialisation.
The s3c243xx_clock_register function uses this array to
register clocks and does not require it to stay around
after exit.
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Initialise the hardware register settings on boot, to allow the
device to function correctly.
Signed-off-by: Christer Weinigel <christer@weinigel.se>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
This patch adds the configuration needed for the LCD display on the n30.
Signed-off-by: Christer Weinigel <christer@weinigel.se>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Add support for the Acer N35 and related devices.
Signed-off-by: Christer Weinigel <christer@weinigel.se>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Add support for the GPIO buttons on the Acer N30.
Signed-off-by: Christer Weinigel <christer@weinigel.se>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Add support for the USB D+ pull up on the Acer N30. This is needed
for the USB gadget to work properly.
Signed-off-by: Christer Weinigel <christer@weinigel.se>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Clean up some junk from the official kernel.
The compile-command is something that's only useful for me personally
and doesn't belong in the mainstream kernel.
Signed-off-by: Christer Weinigel <christer@weinigel.se>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Move to using the physmap platform device code to attached NOR
flash on Simtec boards so that the old bast-flash driver can be
safely removed.
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Use the pata_platform driver to provide the IDE port
drivers on the Simntec BAST and Thorcom VR1000 machines
as a precursor to removing drivers/ide/arm/bast-ide.c
This will mean that the system will need SCSI and SCSI disc
support as a minimum, and any references to hdX will be
changed to sdX.
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Fix the flags entries for the DM9000 IRQ entries on both the
Simtec BAST and Thorcom VR1000 board. The current entries use
the IRQF_ flags, but we should be using the IORESOURCE_IRQ_
definitions.
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
PATCH FOLLOWS
KernelVersion: 2.6.26-rc5
Add the IRQF_TRIGGER_ type to the DM9000 IRQ resource
to stop the driver itself complaining it was not given
any flags to use.
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Add the IRQF_TRIGGER_ type to the DM9000 IRQ resource
to stop the driver itself complaining it was not given
any flags to use.
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Fix the pm sys device .name initialiser which was
missed when updating the last patch submission.
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>