History log of /linux-master/arch/arm/common/sa1111.c
Revision Date Author Comments
# 414f28a9 20-Aug-2023 Randy Dunlap <rdunlap@infradead.org>

ARM: 9319/1: sa1111: fix sa1111_probe kernel-doc warnings

Document only the platform_driver probe entry point in kernel-doc
to prevent kernel-doc warnings:

sa1111.c:802: warning: Function parameter or member 'me' not described in '__sa1111_probe'
sa1111.c:802: warning: Function parameter or member 'mem' not described in '__sa1111_probe'
sa1111.c:802: warning: Function parameter or member 'irq' not described in '__sa1111_probe'
sa1111.c:802: warning: expecting prototype for sa1111_probe(). Prototype was for __sa1111_probe() instead

Also, use ReST list format to enumerate the return values.

Link: https://lore.kernel.org/oe-kbuild-all/202308112255.SK1J0rze-lkp@intel.com/

Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Reported-by: kernel test robot <lkp@intel.com>
Cc: linux-arm-kernel@lists.infradead.org
Cc: patches@armlinux.org.uk
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>


# 6475f4bb 16-May-2023 Arnd Bergmann <arnd@arndb.de>

ARM: sa1100: address missing prototype warnings

There are three warnings for mach-sa1100 when building with W=1:

arch/arm/common/sa1111.c:699:1: error: no previous prototype for 'sa1111_configure_smc' [-Werror=missing-prototypes]
699 | sa1111_configure_smc(struct sa1111 *sachip, int sdram, unsigned int drac,
| ^~~~~~~~~~~~~~~~~~~~
arch/arm/mach-sa1100/assabet.c:718:13: error: no previous prototype for 'assabet_init_irq' [-Werror=missing-prototypes]
718 | void __init assabet_init_irq(void)
| ^~~~~~~~~~~~~~~~
arch/arm/mach-sa1100/pm.c:126:12: error: no previous prototype for 'sa11x0_pm_init' [-Werror=missing-prototypes]
126 | int __init sa11x0_pm_init(void)
| ^~~~~~~~~~~~~~

The first two are only used locally and can be 'static', while
the last one needs to include the right header.

Link: https://lore.kernel.org/r/20230516153109.514251-12-arnd@kernel.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>


# 74a5b94b 14-Mar-2023 Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

ARM: Convert to platform remove callback returning void

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Shawn Guo <shawnguo@kernel.org> # for imx/mmdc
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Link: https://lore.kernel.org/r/20230314103225.2787101-1-u.kleine-koenig@pengutronix.de
Signed-off-by: Arnd Bergmann <arnd@arndb.de>


# 9ba26f5c 03-Feb-2022 Arnd Bergmann <arnd@arndb.de>

ARM: sa1100/assabet: move dmabounce hack to ohci driver

The sa1111 platform is one of the two remaining users of the old Arm
specific "dmabounce" code, which is an earlier implementation of the
generic swiotlb.

Linus Walleij submitted a patch that removes dmabounce support from
the ixp4xx, and I had a look at the other user, which is the sa1111
companion chip.

Looking at how dmabounce is used, I could narrow it down to one driver
one three machines:

- dmabounce is only initialized on assabet/neponset, jornada720 and
badge4, which are the platforms that have an sa1111 and support
DMA on it.

- All three of these suffer from "erratum #7" that requires only
doing DMA to half the memory sections based on one of the address
lines, in addition, the neponset also can't DMA to the RAM that
is connected to sa1111 itself.

- the pxa lubbock machine also has sa1111, but does not support DMA
on it and does not set dmabounce.

- only the OHCI and audio devices on sa1111 support DMA, but as
there is no audio driver for this hardware, only OHCI remains.

In the OHCI code, I noticed that two other platforms already have
a local bounce buffer support in the form of the "local_mem"
allocator. Specifically, TMIO and SM501 use this on a few other ARM
boards with 16KB or 128KB of local SRAM that can be accessed from the
OHCI and from the CPU.

While this is not the same problem as on sa1111, I could not find a
reason why we can't re-use the existing implementation but replace the
physical SRAM address mapping with a locally allocated DMA buffer.

There are two main downsides:

- rather than using a dynamically sized pool, this buffer needs
to be allocated at probe time using a fixed size. Without
having any idea of what it should be, I picked a size of
64KB, which is between what the other two OHCI front-ends use
in their SRAM. If anyone has a better idea what that size
is reasonable, this can be trivially changed.

- Previously, only USB transfers to unaddressable memory needed
to go through the bounce buffer, now all of them do, which may
impact runtime performance for USB endpoints that do a lot of
transfers.

On the upside, the local_mem support uses write-combining buffers,
which should be a bit faster for transfers to the device compared to
normal uncached coherent memory as used in dmabounce.

Cc: Linus Walleij <linus.walleij@linaro.org>
Cc: Russell King <linux@armlinux.org.uk>
Cc: Christoph Hellwig <hch@infradead.org>
Cc: Laurentiu Tudor <laurentiu.tudor@nxp.com>
Cc: linux-usb@vger.kernel.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Christoph Hellwig <hch@lst.de>


# 08d3df8c 01-Sep-2019 Arnd Bergmann <arnd@arndb.de>

ARM: pxa: split up mach/hardware.h

The mach/hardware.h is included in lots of places, and it provides
three different things on pxa:

- the cpu_is_pxa* macros
- an indirect inclusion of mach/addr-map.h
- the __REG() and io_pv2() helper macros

Split it up into separate <linux/soc/pxa/cpu.h> and mach/pxa-regs.h
headers, then change all the files that use mach/hardware.h to
include the exact set of those three headers that they actually
need, allowing for further more targeted cleanup.

linux/soc/pxa/cpu.h can remain permanently exported and is now in
a global location along with similar headers. pxa-regs.h and
addr-map.h are only used in a very small number of drivers now
and can be moved to arch/arm/mach-pxa/ directly when those drivers
are to pass the necessary data as resources.

Cc: Michael Turquette <mturquette@baylibre.com>
Cc: Stephen Boyd <sboyd@kernel.org>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: Jacek Anaszewski <jacek.anaszewski@gmail.com>
Cc: Pavel Machek <pavel@ucw.cz>
Acked-by: Ulf Hansson <ulf.hansson@linaro.org>
Cc: Dominik Brodowski <linux@dominikbrodowski.net>
Acked-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Guenter Roeck <linux@roeck-us.net>
Acked-by: Mark Brown <broonie@kernel.org>
Cc: linux-clk@vger.kernel.org
Cc: linux-pm@vger.kernel.org
Cc: linux-input@vger.kernel.org
Cc: linux-leds@vger.kernel.org
Cc: linux-mmc@vger.kernel.org
Cc: linux-mtd@lists.infradead.org
Cc: linux-rtc@vger.kernel.org
Cc: linux-usb@vger.kernel.org
Cc: dri-devel@lists.freedesktop.org
Cc: linux-fbdev@vger.kernel.org
Cc: linux-watchdog@vger.kernel.org
Cc: alsa-devel@alsa-project.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>


# fc7a6209 13-Jul-2021 Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

bus: Make remove callback return void

The driver core ignores the return value of this callback because there
is only little it can do when a device disappears.

This is the final bit of a long lasting cleanup quest where several
buses were converted to also return void from their remove callback.
Additionally some resource leaks were fixed that were caused by drivers
returning an error code in the expectation that the driver won't go
away.

With struct bus_type::remove returning void it's prevented that newly
implemented buses return an ignored error code and so don't anticipate
wrong expectations for driver authors.

Reviewed-by: Tom Rix <trix@redhat.com> (For fpga)
Reviewed-by: Mathieu Poirier <mathieu.poirier@linaro.org>
Reviewed-by: Cornelia Huck <cohuck@redhat.com> (For drivers/s390 and drivers/vfio)
Acked-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> (For ARM, Amba and related parts)
Acked-by: Mark Brown <broonie@kernel.org>
Acked-by: Chen-Yu Tsai <wens@csie.org> (for sunxi-rsb)
Acked-by: Pali Rohár <pali@kernel.org>
Acked-by: Mauro Carvalho Chehab <mchehab@kernel.org> (for media)
Acked-by: Hans de Goede <hdegoede@redhat.com> (For drivers/platform)
Acked-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Acked-By: Vinod Koul <vkoul@kernel.org>
Acked-by: Juergen Gross <jgross@suse.com> (For xen)
Acked-by: Lee Jones <lee.jones@linaro.org> (For mfd)
Acked-by: Johannes Thumshirn <jth@kernel.org> (For mcb)
Acked-by: Johan Hovold <johan@kernel.org>
Acked-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> (For slimbus)
Acked-by: Kirti Wankhede <kwankhede@nvidia.com> (For vfio)
Acked-by: Maximilian Luz <luzmaximilian@gmail.com>
Acked-by: Heikki Krogerus <heikki.krogerus@linux.intel.com> (For ulpi and typec)
Acked-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com> (For ipack)
Acked-by: Geoff Levand <geoff@infradead.org> (For ps3)
Acked-by: Yehezkel Bernat <YehezkelShB@gmail.com> (For thunderbolt)
Acked-by: Alexander Shishkin <alexander.shishkin@linux.intel.com> (For intel_th)
Acked-by: Dominik Brodowski <linux@dominikbrodowski.net> (For pcmcia)
Acked-by: Rafael J. Wysocki <rafael@kernel.org> (For ACPI)
Acked-by: Bjorn Andersson <bjorn.andersson@linaro.org> (rpmsg and apr)
Acked-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> (For intel-ish-hid)
Acked-by: Dan Williams <dan.j.williams@intel.com> (For CXL, DAX, and NVDIMM)
Acked-by: William Breathitt Gray <vilhelm.gray@gmail.com> (For isa)
Acked-by: Stefan Richter <stefanr@s5r6.in-berlin.de> (For firewire)
Acked-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> (For hid)
Acked-by: Thorsten Scherer <t.scherer@eckelmann.de> (For siox)
Acked-by: Sven Van Asbroeck <TheSven73@gmail.com> (For anybuss)
Acked-by: Ulf Hansson <ulf.hansson@linaro.org> (For MMC)
Acked-by: Wolfram Sang <wsa@kernel.org> # for I2C
Acked-by: Sudeep Holla <sudeep.holla@arm.com>
Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Acked-by: Finn Thain <fthain@linux-m68k.org>
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Link: https://lore.kernel.org/r/20210713193522.1770306-6-u.kleine-koenig@pengutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# a1e5cd96 04-May-2021 Marc Zyngier <maz@kernel.org>

ARM: Bulk conversion to generic_handle_domain_irq()

Wherever possible, replace constructs that match either
generic_handle_irq(irq_find_mapping()) or
generic_handle_irq(irq_linear_revmap()) to a single call to
generic_handle_domain_irq().

Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>


# 074a6bda 14-Jan-2021 Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

ARM: 9048/1: sa1111: make sa1111 bus's remove callback return void

The driver core ignores the return value of struct device_driver::remove
because there is only little that can be done. To simplify the quest to
make this function return void, let struct sa1111_driver::remove return
void, too. All users already unconditionally return 0, this commit makes
it obvious that returning an error code is a bad idea and ensures future
users behave accordingly.

Link: https://lore.kernel.org/r/20201126114724.2028511-1-u.kleine-koenig@pengutronix.de
Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>


# 0eb3b4ab 20-Oct-2020 Christoph Hellwig <hch@lst.de>

ARM/sa1111: add a missing include of dma-map-ops.h

Ensure the dmabounce functions are available for all Kconfig
permutations.

Fixes: 0a0f0d8be76d ("dma-mapping: split <linux/dma-mapping.h>")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>


# ad00a325 10-Mar-2020 Marc Zyngier <maz@kernel.org>

ARM: sa1111: Fix irq_retrigger callback return value

The irq_retrigger callback is supposed to return 0 when retrigger
has failed, and a non-zero value otherwise. Tell the core code
that the driver has succedded in using the HW to retrigger the
interrupt (if ever).

Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20200310184921.23552-4-maz@kernel.org


# d2912cb1 04-Jun-2019 Thomas Gleixner <tglx@linutronix.de>

treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500

Based on 2 normalized pattern(s):

this program is free software you can redistribute it and or modify
it under the terms of the gnu general public license version 2 as
published by the free software foundation

this program is free software you can redistribute it and or modify
it under the terms of the gnu general public license version 2 as
published by the free software foundation #

extracted by the scancode license scanner the SPDX license identifier

GPL-2.0-only

has been chosen to replace the boilerplate/reference in 4122 file(s).

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Enrico Weigelt <info@metux.net>
Reviewed-by: Kate Stewart <kstewart@linuxfoundation.org>
Reviewed-by: Allison Randal <allison@lohutok.net>
Cc: linux-spdx@vger.kernel.org
Link: https://lkml.kernel.org/r/20190604081206.933168790@linutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 87dfb311 14-May-2019 Masahiro Yamada <yamada.masahiro@socionext.com>

treewide: replace #include <asm/sizes.h> with #include <linux/sizes.h>

Since commit dccd2304cc90 ("ARM: 7430/1: sizes.h: move from asm-generic
to <linux/sizes.h>"), <asm/sizes.h> and <asm-generic/sizes.h> are just
wrappers of <linux/sizes.h>.

This commit replaces all <asm/sizes.h> and <asm-generic/sizes.h> to
prepare for the removal.

Link: http://lkml.kernel.org/r/1553267665-27228-1-git-send-email-yamada.masahiro@socionext.com
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>


# e1b0d978 28-Nov-2018 Russell King <rmk+kernel@armlinux.org.uk>

ARM: sa1111: remove legacy GPIO interfaces

Now that we have migrated all users of the legacy private SA1111 gpio
interfaces, we can remove these redundant GPIO interfaces.

Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>


# be2bedb0 06-Sep-2016 Russell King <rmk+kernel@armlinux.org.uk>

ARM: sa1111: map interrupt numbers through irqdomain

Map the interrupt numbers for SA1111 through the SA1111 IRQ domain
rather than doing our own translation. This allows us to eliminate
the irq_base sachip member.

Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>


# 4c9f6d31 07-Sep-2016 Russell King <rmk+kernel@armlinux.org.uk>

ARM: sa1111: use an irqdomain for SA1111 interrupts

Use an IRQ domain for SA1111 interrupts, which allows us to separate the
hardware interrupt number from the Linux interrupt number. We can then
use the hardware interrupt number stored in the irq_data to calculate
the register offsets and mask.

Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>


# a5b549ed 07-Sep-2016 Russell King <rmk+kernel@armlinux.org.uk>

ARM: sa1111: remove special sa1111 mmio accessors

Remove the special sa1111 mmio accessors from core sa1111 code, and
their definition in sa1111.h now that all users are gone.

Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>


# 50419497 06-Sep-2016 Russell King <rmk+kernel@armlinux.org.uk>

ARM: sa1111: remove legacy suspend/resume methods

The legacy device-driver suspend/resume methods are not used by any of
our drivers, so let's remove this redundant code.

Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>


# 0cd070c9 06-Sep-2016 Russell King <rmk+kernel@armlinux.org.uk>

ARM: sa1111: remove legacy shutdown method

Since the only user of the SA1111 device driver shutdown method has now
gone, we can kill the bus level support code and the entry in the
sa1111 device driver structure.

Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>


# b60752f2 06-Sep-2016 Russell King <rmk+kernel@armlinux.org.uk>

ARM: sa1111: provide to_sa1111_device() macro

Provide a nicer to_sa1111_device macro to convert a struct device to a
sa1111_dev. We will need this for drivers when converting them to
dev_pm_ops, or removing shutdown methods.

Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>


# cf6e4ca3 05-Sep-2016 Russell King <rmk+kernel@armlinux.org.uk>

ARM: sa1111: add sa1111_get_irq()

Add a helper function to get the irq number for a device.

Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>


# 1629c9ab 06-Sep-2016 Russell King <rmk+kernel@armlinux.org.uk>

ARM: sa1111: clean up duplication in IRQ chip implementation

Clean up the duplication in the IRQ chip implementation - we can compute
the register address from the interrupt number rather than duplicating
the code for each register.

Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>


# 17cf5011 31-Aug-2016 Russell King <rmk+kernel@armlinux.org.uk>

ARM: sa1111: implement a gpio_chip for SA1111 GPIOs

Add a gpio_chip instance for SA1111 GPIOs. This allows us to use
gpiolib to lookup and manipulate SA1111 GPIOs.

Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>


# ccb7d854 06-Sep-2016 Russell King <rmk+kernel@armlinux.org.uk>

ARM: sa1111: move irq cleanup to separate function

Move the SA1111 interrupt cleanup to a separate function, so it can be
re-used in the probe error cleanup path.

Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>


# deee856a 30-Aug-2016 Russell King <rmk+kernel@armlinux.org.uk>

ARM: sa1111: use devm_clk_get()

Convert sa1111 to use devm_clk_get() to get its clock resource, and
strip out the clk_put() calls. This simplifies the error handling
a little.

Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>


# 7d53c1f0 06-Sep-2016 Russell King <rmk+kernel@armlinux.org.uk>

ARM: sa1111: use devm_kzalloc()

Use devm_kzalloc() to allocate our driver data, so we can eliminate its
kfree() from the device removal and error cleanup paths.

Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>


# eac8dbf7 03-Sep-2016 Russell King <rmk+kernel@armlinux.org.uk>

ARM: sa1111: ensure we only touch RAB bus type devices when removing

When removing a SA1111 device, we try to remove all child devices.
However, we must only remove our own RAB bus typed devices from the
tree, there may be other devices present which should not be touched.

This is necessary before we introduce gpiochip to SA1111 to avoid
incorrectly trying to remove the gpiochip device, leading to an oops
in __release_resource().

Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>


# 87d5dd62 06-Sep-2016 Russell King <rmk+kernel@armlinux.org.uk>

ARM: sa1111: fix missing clk_disable()

SA1111 forgets to call clk_disable() in the probe error cleanup path.
Add the necessary call.

Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>


# 06dfe5cc 06-Sep-2016 Russell King <rmk+kernel@armlinux.org.uk>

ARM: sa1111: fix pcmcia suspend/resume

SA1111 PCMCIA was broken when PCMCIA switched to using dev_pm_ops for
the PCMCIA socket class. PCMCIA used to handle suspend/resume via the
socket hosting device, which happened at normal device suspend/resume
time.

However, the referenced commit changed this: much of the resume now
happens much earlier, in the noirq resume handler of dev_pm_ops.

However, on SA1111, the PCMCIA device is not accessible as the SA1111
has not been resumed at _noirq time. It's slightly worse than that,
because the SA1111 has already been put to sleep at _noirq time, so
suspend doesn't work properly.

Fix this by converting the core SA1111 code to use dev_pm_ops as well,
and performing its own suspend/resume at noirq time.

This fixes these errors in the kernel log:

pcmcia_socket pcmcia_socket0: time out after reset
pcmcia_socket pcmcia_socket1: time out after reset

and the resulting lack of PCMCIA cards after a S2RAM cycle.

Fixes: d7646f7632549 ("pcmcia: use dev_pm_ops for class pcmcia_socket_class")
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>


# 7c0091ec 06-Sep-2016 Russell King <rmk+kernel@armlinux.org.uk>

ARM: sa1111: fix pcmcia interrupt mask polarity

The polarity of the high IRQs was being calculated using
SA1111_IRQMASK_HI(), but this assumes a Linux interrupt number, not a
hardware interrupt number. Hence, the resulting mask was incorrect.
Fix this.

Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>


# cb034407 03-Sep-2016 Russell King <rmk+kernel@armlinux.org.uk>

ARM: sa1111: fix error code propagation in sa1111_probe()

Ensure that we propagate the platform_get_irq() error code out of the
probe function. This allows probe deferrals to work correctly should
platform_get_irq() not be able to resolve the interrupt in a DT
environment at probe time.

Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>


# 17f29d36 15-Feb-2016 Marek Szyprowski <m.szyprowski@samsung.com>

ARM: 8523/1: sa1111: ensure no negative value gets returned on positive match

This patch ensures that existing bus match callbacks don't return
negative values (which might be interpreted as potential errors in the
future) in case of positive match.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>


# bd0b9ac4 14-Sep-2015 Thomas Gleixner <tglx@linutronix.de>

genirq: Remove irq argument from irq flow handlers

Most interrupt flow handlers do not use the irq argument. Those few
which use it can retrieve the irq number from the irq descriptor.

Remove the argument.

Search and replace was done with coccinelle and some extra helper
scripts around it. Thanks to Julia for her help!

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Julia Lawall <Julia.Lawall@lip6.fr>
Cc: Jiang Liu <jiang.liu@linux.intel.com>


# e8d36d5d 27-Jul-2015 Rob Herring <robh@kernel.org>

ARM: kill off set_irq_flags usage

set_irq_flags is ARM specific with custom flags which have genirq
equivalents. Convert drivers to use the genirq interfaces directly, so we
can kill off set_irq_flags. The translation of flags is as follows:

IRQF_VALID -> !IRQ_NOREQUEST
IRQF_PROBE -> !IRQ_NOPROBE
IRQF_NOAUTOEN -> IRQ_NOAUTOEN

For IRQs managed by an irqdomain, the irqdomain core code handles clearing
and setting IRQ_NOREQUEST already, so there is no need to do this in
.map() functions and we can simply remove the set_irq_flags calls. Some
users also modify IRQ_NOPROBE and this has been maintained although it
is not clear that is really needed. There appears to be a great deal of
blind copy and paste of this code.

Signed-off-by: Rob Herring <robh@kernel.org>
Cc: Russell King <linux@arm.linux.org.uk>
Cc: Sekhar Nori <nsekhar@ti.com>
Cc: Kevin Hilman <khilman@deeprootsystems.com>
Cc: Jason Cooper <jason@lakedaemon.net>
Cc: Andrew Lunn <andrew@lunn.ch>
Cc: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Cc: Gregory Clement <gregory.clement@free-electrons.com>
Acked-by: Hans Ulli Kroll <ulli.kroll@googlemail.com>
Acked-by: Shawn Guo <shawnguo@kernel.org>
Cc: Sascha Hauer <kernel@pengutronix.de>
Cc: Imre Kaloz <kaloz@openwrt.org>
Acked-by: Krzysztof Halasa <khalasa@piap.pl>
Cc: Greg Ungerer <gerg@uclinux.org>
Cc: Roland Stigge <stigge@antcom.de>
Cc: Tony Lindgren <tony@atomide.com>
Cc: Daniel Mack <daniel@zonque.org>
Cc: Haojian Zhuang <haojian.zhuang@gmail.com>
Cc: Robert Jarzmik <robert.jarzmik@free.fr>
Cc: Simtec Linux Team <linux@simtec.co.uk>
Cc: Kukjin Kim <kgene@kernel.org>
Cc: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Acked-by: Wan ZongShun <mcuos.com@gmail.com>
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-omap@vger.kernel.org
Cc: linux-samsung-soc@vger.kernel.org
Tested-by: Kevin Hilman <khilman@linaro.org>
Signed-off-by: Olof Johansson <olof@lixom.net>


# b9dce3ac 13-Jul-2015 Thomas Gleixner <tglx@linutronix.de>

ARM/sa1111: Prepare sa1111_irq_handler for irq argument removal

The irq argument of most interrupt flow handlers is unused or merily
used instead of a local variable. The handlers which need the irq
argument can retrieve the irq number from the irq descriptor.

Search and update was done with coccinelle and the invaluable help of
Julia Lawall.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Julia Lawall <Julia.Lawall@lip6.fr>
Cc: Jiang Liu <jiang.liu@linux.intel.com>
Cc: Russell King <linux+kernel@arm.linux.org.uk>
Cc: linux-arm-kernel@lists.infradead.org


# f575398b 03-Jun-2015 Jiang Liu <jiang.liu@linux.intel.com>

ARM, irq: Use irq_desc_get_xxx() to avoid redundant lookup of irq_desc

Use irq_desc_get_xxx() to avoid redundant lookup of irq_desc while we
already have a pointer to corresponding irq_desc.

Signed-off-by: Jiang Liu <jiang.liu@linux.intel.com>
Cc: Russell King <rmk+kernel@arm.linux.org.uk>
Cc: linux-arm-kernel@lists.infradead.org
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>


# 056c0acf 16-Jun-2015 Russell King <rmk+kernel@arm.linux.org.uk>

ARM: sa1100: convert SA11x0 related code to use new chained handler helper

Convert SA11x0 (Neponset, SA1111, and UCB1x00 code) to use the new
irq_set_chained_handler_and_data() helper.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Cc: Alexandre Courbot <gnurou@gmail.com>
Cc: Hans Ulli Kroll <ulli.kroll@googlemail.com>
Cc: Jason Cooper <jason@lakedaemon.net>
Cc: Lee Jones <lee.jones@linaro.org>
Cc: Linus Walleij <linus.walleij@linaro.org>
Cc: Thierry Reding <thierry.reding@gmail.com>
Cc: linux-arm-kernel@lists.infradead.org
Link: http://lkml.kernel.org/r/E1Z4yzx-0002S6-7p@rmk-PC.arm.linux.org.uk
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>


# 4ed89f22 28-Oct-2014 Russell King <rmk+kernel@arm.linux.org.uk>

ARM: convert printk(KERN_* to pr_*

Convert many (but not all) printk(KERN_* to pr_* to simplify the code.
We take the opportunity to join some printk lines together so we don't
split the message across several lines, and we also add a few levels
to some messages which were previously missing them.

Tested-by: Andrew Lunn <andrew@lunn.ch>
Tested-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>


# d155fc75 20-Oct-2014 Wolfram Sang <wsa@kernel.org>

ARM: common: drop owner assignment from platform_drivers

A platform_driver does not need to set an owner, it will be populated by the
driver core.

Signed-off-by: Wolfram Sang <wsa@the-dreams.de>


# 351a102d 21-Dec-2012 Greg Kroah-Hartman <gregkh@linuxfoundation.org>

ARM: drivers: remove __dev* attributes.

CONFIG_HOTPLUG is going away as an option. As a result, the __dev*
markings need to be removed.

This change removes the use of __devinit, __devexit_p, __devinitdata,
and __devexit from these drivers.

Based on patches originally written by Bill Pemberton, but redone by me
in order to handle some of the coding style issues better, by hand.

Cc: Bill Pemberton <wfp5p@virginia.edu>
Cc: Russell King <linux@arm.linux.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 22eeaff3 29-Jan-2012 Russell King <rmk+kernel@arm.linux.org.uk>

ARM: sa1111: use dev_err() rather than printk()

Use dev_err() to report device specific errors rather than printk().

Acked-by: Nicolas Pitre <nico@linaro.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>


# 924e1d49 29-Jan-2012 Russell King <rmk+kernel@arm.linux.org.uk>

ARM: sa1111: cleanup sub-device registration and unregistration

Move the releasing of resources out of the release function - this
allows a cleaner and more conventional arrangement of the registration
failure paths and a saner unregistration process for these devices.

Acked-by: Nicolas Pitre <nico@linaro.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>


# 21d1c770 29-Jan-2012 Russell King <rmk+kernel@arm.linux.org.uk>

ARM: sa1111: only setup DMA for DMA capable devices

It's pointless registering the PS/2 interfaces with the dmabounce code
when there's no DMA support for these in hardware, so only setup the
DMA masks for two subdevices which support DMA - the OHCI and SAC.

Acked-by: Nicolas Pitre <nico@linaro.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>


# 09a2ba2f 29-Jan-2012 Russell King <rmk+kernel@arm.linux.org.uk>

ARM: sa1111: register sa1111 devices with dmabounce in bus notifier

Use the bus notifier to register sa1111 devices with dmabounce, rather
than after the device has been registered, potentially racing with
driver binding.

Acked-by: Nicolas Pitre <nico@linaro.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>


# 07be45f5 26-Jan-2012 Russell King <rmk+kernel@arm.linux.org.uk>

ARM: sa1111: provide a generic way to prevent devices from registering

Some platforms don't want certain devices to be registered, because,
eg, the interface is not wired. Provide a way for platforms to
prevent various devices from being registered via a devid bitmask in
the platform data.

Acked-by: Nicolas Pitre <nico@linaro.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>


# e5c0fc41 25-Jan-2012 Russell King <rmk+kernel@arm.linux.org.uk>

ARM: sa1111: change devid to be a bitmask

Change the sa1111 device id to be a bitmask. This allows us to
specify the actual device, while allowing a single driver to bind
to both PS2 devices.

Acked-by: Nicolas Pitre <nico@linaro.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>


# ae99ddbc 26-Jan-2012 Russell King <rmk+kernel@arm.linux.org.uk>

ARM: sa1111: add platform enable/disable functions

Add platform hooks to be called when individual sa1111 devices are
enabled and disabled. This will allow us to move some platform
specifics out of the individual drivers.

Acked-by: Nicolas Pitre <nico@linaro.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>


# 6bd72f05 26-Jan-2012 Russell King <rmk+kernel@arm.linux.org.uk>

ARM: sa1111: add shutdown hook to sa1111_driver structure

Add a shutdown hook to the sa1111_driver structure to allow drivers
to be notified of system reboots and shutdowns.

Acked-by: Nicolas Pitre <nico@linaro.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>


# 36d31213 24-Jan-2012 Russell King <rmk+kernel@arm.linux.org.uk>

ARM: sa1111: implement support for sparse IRQs

Implement the necessary allocation/freeing functionality to support
sparse IRQs with the SA-1111 device. On non-sparse IRQ platforms,
this allows us to dynamically allocate from within the available IRQ
number space.

Acked-by: Nicolas Pitre <nico@linaro.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>


# f03ecaa0 15-Jan-2012 Russell King <rmk+kernel@arm.linux.org.uk>

ARM: sa1111: finish "allow cascaded IRQs to be used by platforms"

Commit 19851c58e680 (sa1111: allow cascaded IRQs to be used by platforms)
moved the IRQ definitions to the .c file, and added an irq_base member
to the private data structure.

The inerrupt demultiplexer uses irq_base, but the interrupt setup code
does not. Also, although the commit adds a private data structure to
pass this data, it isn't even referenced, resulting in irq_base being
zero.

We also copied the IRQ numbers from the device info array into the actual
devices, resulting in wrong interrupt numbers passed to the sub-devices.

The net effect of this is that we always overwrite IRQs 0-54, even if
they are allocated elsewhere in the system.

Add the code necessary to setup the private irq_base, and use it in the
IRQ setup code. Make the SA-1111 probe fail with -EINVAL if there is no
platform data provided.

Acked-by: Nicolas Pitre <nico@linaro.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>


# 4d5d1128 14-Jan-2012 Russell King <rmk+kernel@arm.linux.org.uk>

ARM: sa1111: add sa1111 core driver .owner initializer

Add an initializer for the struct device_driver .owner member.

Acked-by: Nicolas Pitre <nico@linaro.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>


# a22db0f3 03-Feb-2012 Russell King <rmk+kernel@arm.linux.org.uk>

ARM: sa1111: fix PWM state on suspend

We should not write to the SA1111 registers after setting the SLEEP
bit. Moreover, the manual says that the PWM registers should be
disabled before we enter sleep. So, move the clearing of these
registers earlier in the suspend sequence.

Acked-by: Nicolas Pitre <nico@linaro.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>


# 29c140b6 03-Feb-2012 Russell King <rmk+kernel@arm.linux.org.uk>

ARM: sa1111: fix memory request/grant setup on PM events

We weren't re-enabling the memory request/grant signals on resume,
causing DMA devices on the sa1111 to fail.

Acked-by: Nicolas Pitre <nico@linaro.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>


# 80ea2065 03-Feb-2012 Russell King <rmk+kernel@arm.linux.org.uk>

ARM: sa11x0: fix section mismatch warnings

Neponset calls sa1110_mb_disable() from __devinit code, but
sa1110_mb_disable() is marked __init, and so causes a section
mismatch warning.

As sa1110_mb_enable() and sa1110_mb_disable() need to be callable
from suspend/resume paths as well, they must not be marked __init
or __devinit.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>


# 72ae00c9 22-Sep-2011 Russell King <rmk+kernel@arm.linux.org.uk>

clk: sa1111: convert to clk_prepare()/clk_unprepare()

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>


# 0703ed2a 04-Jul-2011 Russell King <rmk+kernel@arm.linux.org.uk>

ARM: dmabounce: get rid of dma_needs_bounce global function

Pass the device type specific needs_bounce function in at dmabounce
register time, avoiding the need for a platform specific global
function to do this.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>


# be20902b 11-May-2011 Russell King <rmk+kernel@arm.linux.org.uk>

ARM: use ARM_DMA_ZONE_SIZE to adjust the zone sizes

Rather than each platform providing its own function to adjust the
zone sizes, use the new ARM_DMA_ZONE_SIZE definition to perform this
adjustment. This ensures that the actual DMA zone size and the
ISA_DMA_THRESHOLD/MAX_DMA_ADDRESS definitions are consistent with
each other, and moves this complexity out of the platform code.

Acked-by: Nicolas Pitre <nicolas.pitre@linaro.org>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>


# f38c02f3 24-Mar-2011 Thomas Gleixner <tglx@linutronix.de>

arm: Fold irq_set_chip/irq_set_handler

Use irq_set_chip_and_handler() instead. Converted with coccinelle.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>


# 9323f261 24-Mar-2011 Thomas Gleixner <tglx@linutronix.de>

arm: Reorder irq_set_ function calls

Reorder
irq_set_chip()
irq_set_chip_data()
irq_set_handler()

to

irq_set_chip()
irq_set_handler()
irq_set_chip_data()

so the next patch can combine irq_set_chip() and irq_set_handler() to
irq_set_chip_and_handler().

Automated conversion with coccinelle.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>


# 6845664a 24-Mar-2011 Thomas Gleixner <tglx@linutronix.de>

arm: Cleanup the irq namespace

Convert to the new function names. Automated with coccinelle.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>


# cae39988 10-Jan-2011 Pavel Machek <pma@sysgo.com>

ARM: sa1111: fix typo in sa1111_retrigger_lowirq()

Signed-off-by: Pavel Machek <pma@sysgo.com>
Signed-off-by: Eric Miao <eric.y.miao@gmail.com>


# 8231e741 29-Nov-2010 Lennert Buytenhek <buytenh@wantstofly.org>

ARM: sa1111: irq_data conversion.

Signed-off-by: Lennert Buytenhek <buytenh@secretlab.ca>
Acked-by: Kristoffer Ericson <kristoffer.ericson@gmail.com>


# 055d1965 02-Sep-2010 Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

ARM: 6349/1: sa1111: move __sa1111_probe() to .devinit.text

__sa1111_probe is only called by sa1111_probe that lives in .devinit.text.
So it's save to move the former to .devinit.text, too.

Acked-by: Kristoffer Ericson <kristoffer.ericson@gmail.com>
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>


# f2d2420b 30-Jul-2010 Julia Lawall <julia@diku.dk>

SA1111: Eliminate use after free

__sa1111_remove always frees its argument, so the subsequent reference to
sachip->saved_state represents a use after free. __sa1111_remove does not
appear to use the saved_state field, so the patch simply frees it first.

A simplified version of the semantic patch that finds this problem is as
follows: (http://coccinelle.lip6.fr/)

// <smpl>
@@
expression E,E2;
@@

__sa1111_remove(E)
...
(
E = E2
|
* E
)
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>


# b65b4781 22-May-2010 Russell King <rmk+kernel@arm.linux.org.uk>

ARM: Remove 'node' argument form arch_adjust_zones()

Since we no longer support discontigmem, node is always zero, so
remove this argument.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>


# 3defb247 26-May-2010 Marek Vašut <marek.vasut@gmail.com>

ARM: 6146/1: sa1111: Prevent deadlock in resume path

This patch reorganises the sa1111_resume() function in a manner the spinlock
happens after calling the sa1111_wake(). This fixes two bugs:

1) This function called sa1111_wake() which tried to claim the same spinlock
the sa1111_resume() already claimed. This would result in certain deadlock.

Original idea for this part: Russell King <rmk+kernel@arm.linux.org.uk>

2) The function didn't unlock the spinlock in case the chip didn't report
correct ID.

Original idea for this part: Julia Lawall <julia@diku.dk>

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Cc: <stable@kernel.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>


# 19851c58 26-Dec-2009 Eric Miao <eric.y.miao@gmail.com>

[ARM] sa1111: allow cascaded IRQs to be used by platforms

Signed-off-by: Eric Miao <eric.y.miao@gmail.com>


# 0a4bc5e8 29-Sep-2009 Hartley Sweeten <hartleys@visionengravers.com>

ARM: 5735/1: sa1111: CodingStyle cleanups

EXPORT_* macros should follow immediately after the closing function
brace line.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Acked-by: Kristoffer Ericson <kristoffer.ericson@gmail.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>


# 442a9022 13-Dec-2008 Julia Lawall <julia@diku.dk>

[ARM] arch/arm/common/sa1111.c: Correct error handling code

If it is reasonable to apply PTR_ERR to the result of calling clk_get, then
that result should first be tested with IS_ERR, not with !.

The semantic patch that makes this change is as follows:
(http://www.emn.fr/x-info/coccinelle/)

// <smpl>
@@
expression E,E1;
@@

if (
- E == NULL
+ IS_ERR(E)
) { <+... when != E = E1
PTR_ERR(E)
...+> }
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>


# 5d43839a 21-Oct-2008 Kristoffer Ericson <kristoffer.ericson@gmail.com>

[ARM] 5315/1: Fix section mismatch warning (sa1111)

This patch fixes the section mismatch warning from
sa1111.o at buildtime.

CC arch/arm/common/sa1111.o
LD arch/arm/common/built-in.o
LD vmlinux.o
MODPOST vmlinux.o
WARNING: vmlinux.o(.text+0x87f4): Section mismatch in reference from the function sa1111_probe() to the function .devinit.text:sa1110_mb_enable()
The function sa1111_probe() references
the function __devinit sa1110_mb_enable().
This is often because sa1111_probe lacks a __devinit
annotation or the annotation of sa1110_mb_enable is wrong.

Signed-off-by: Kristoffer Ericson <kristoffer.ericson@gmail.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>


# 957cf333 17-Oct-2008 Russell King <rmk@dyn-67.arm.linux.org.uk>

[ARM] pxa: fix 3bca103a1e658d23737d20e1989139d9ca8973bf

arch/arm/common/sa1111.c:593: error: implicit declaration of function 'dmabounce_register_dev'

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>


# fced80c7 05-Sep-2008 Russell King <rmk@dyn-67.arm.linux.org.uk>

[ARM] Convert asm/io.h to linux/io.h

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>


# a09e64fb 05-Aug-2008 Russell King <rmk@dyn-67.arm.linux.org.uk>

[ARM] Move include/asm-arm/arch-* to arch/arm/*/include/mach

This just leaves include/asm-arm/plat-* to deal with.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>


# be509729 04-Aug-2008 Russell King <rmk@dyn-67.arm.linux.org.uk>

[ARM] Remove asm/hardware.h, use asm/arch/hardware.h instead

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>


# 6cab4860 26-Jul-2008 Dmitry Baryshkov <dbaryshkov@gmail.com>

[ARM] 5179/1: Replace obsolete IRQT_* and __IRQT_* values with IRQ_TYPE_*

IRQT_* and __IRQT_* were obsoleted long ago by patch [3692/1].
Remove them completely. Sed script for the reference:

s/__IRQT_RISEDGE/IRQ_TYPE_EDGE_RISING/g
s/__IRQT_FALEDGE/IRQ_TYPE_EDGE_FALLING/g
s/__IRQT_LOWLVL/IRQ_TYPE_LEVEL_LOW/g
s/__IRQT_HIGHLVL/IRQ_TYPE_LEVEL_HIGH/g
s/IRQT_RISING/IRQ_TYPE_EDGE_RISING/g
s/IRQT_FALLING/IRQ_TYPE_EDGE_FALLING/g
s/IRQT_BOTHEDGE/IRQ_TYPE_EDGE_BOTH/g
s/IRQT_LOW/IRQ_TYPE_LEVEL_LOW/g
s/IRQT_HIGH/IRQ_TYPE_LEVEL_HIGH/g
s/IRQT_PROBE/IRQ_TYPE_PROBE/g
s/IRQT_NOEDGE/IRQ_TYPE_NONE/g

Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>


# 3f978704 30-May-2008 Kay Sievers <kay.sievers@vrfy.org>

arm: bus_id -> dev_name() and dev_set_name() conversions

Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


# fc3a8828 01-May-2008 Greg Kroah-Hartman <gregkh@suse.de>

driver core: fix a lot of printk usages of bus_id

We have the dev_printk() variants for this kind of thing, use them
instead of directly trying to access the bus_id field of struct device.

This is done in order to remove bus_id entirely.

Cc: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


# 13f75582 08-Jul-2008 Ian Molton <spyro@f2s.com>

Clocklib: Fix SA1111 clock name mess.

This patch uses the ability of PXA's clocklib to alias clock to resolve the
problem caused by sharing the SA1111 IO controller between PXA and SA1100
architectures, which have differing GPIO numbering.

Signed-off-by: Ian Molton <spyro@f2s.com>


# 93160c63 09-Jul-2007 Rafael J. Wysocki <rjw@rjwysocki.net>

PM: do not use saved_state from struct dev_pm_info on ARM

The saved_state member of 'struct dev_pm_info' that's going to be removed
is used in arch/arm/common/locomo.c, arch/arm/common/sa1111.c and
arch/arm/mach-sa1100/neponset.c. Change the code in there to use local
variables for saving the state of devices during suspend.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Cc: Greg KH <greg@kroah.com>
Cc: David Brownell <david-b@pacbell.net>
Acked-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


# 0f0a00be 03-Mar-2007 Russell King <rmk@dyn-67.arm.linux.org.uk>

[ARM] Remove needless linux/ptrace.h includes

Lots of places in arch/arm were needlessly including linux/ptrace.h,
resumably because we used to pass a struct pt_regs to interrupt
handlers. Now that we don't, all these ptrace.h includes are
redundant.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>


# 10dd5ce2 23-Nov-2006 Russell King <rmk@dyn-67.arm.linux.org.uk>

[ARM] Remove compatibility layer for ARM irqs

set_irq_chipdata -> set_irq_chip_data
get_irq_chipdata -> get_irq_chip_data
do_level_IRQ -> handle_level_irq
do_edge_IRQ -> handle_edge_irq
do_simple_IRQ -> handle_simple_irq
irqdesc -> irq_desc
irqchip -> irq_chip

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>


# 0cd61b68 06-Oct-2006 Linus Torvalds <torvalds@g5.osdl.org>

Initial blind fixup for arm for irq changes

Untested, but this should fix up the bulk of the totally mechanical
issues, and should make the actual detail fixing easier.

Signed-off-by: Linus Torvalds <torvalds@osdl.org>


# f30c2269 03-Oct-2006 Uwe Zeisberger <Uwe_Zeisberger@digi.com>

fix file specification in comments

Many files include the filename at the beginning, serveral used a wrong one.

Signed-off-by: Uwe Zeisberger <Uwe_Zeisberger@digi.com>
Signed-off-by: Adrian Bunk <bunk@stusta.de>


# 416112f8 27-Aug-2006 David Brownell <david-b@pacbell.net>

[ARM] 3741/1: remove sa1111.c build warning on non-sa1100 systems

Patch from David Brownell

Remove buld warning when building sa1111 on non-sa1100 platforms (e.g. PXA).

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>


# 38c677cb 01-Aug-2006 David Brownell <david-b@pacbell.net>

[ARM] 3739/1: genirq updates: irq_chip, add and use irq_chip.name

Patch from David Brownell

ARM genirq cleanups/updates:

- Start switching platforms to newer APIs
* use "irq_chip" name, not "irqchip"
* providing irq_chip.name

- Show irq_chip.name in /proc/interrupts, like on x86.

This update a bit more than half of the ARM code. The irq_chip.name
values were chosen to match docs (if I have them) or be otherwise
obvious ("FPGA", "CPLD", or matching the code).

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>


# c4bfa28a 01-Jul-2006 Thomas Gleixner <tglx@linutronix.de>

[ARM] 3686/1: ARM: arm/common: convert irq handling

Patch from Thomas Gleixner

From: Thomas Gleixner <tglx@linutronix.de>

Convert the files in arch/arm/common to use the generic
irq handling functions.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>


# 6ab3d562 30-Jun-2006 Jörn Engel <joern@wohnheim.fh-wedel.de>

Remove obsolete #include <linux/config.h>

Signed-off-by: Jörn Engel <joern@wohnheim.fh-wedel.de>
Signed-off-by: Adrian Bunk <bunk@stusta.de>


# d2a02b93 20-Mar-2006 Russell King <rmk@dyn-67.arm.linux.org.uk>

[ARM] Convert kmalloc+memset to kzalloc

Convert all uses of kmalloc followed by memset to use kzalloc instead.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>


# 97d654f8 15-Mar-2006 Russell King <rmk@dyn-67.arm.linux.org.uk>

[ARM] Convert SA1111 to use clock architecture

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>


# 48944738 19-Jan-2006 David Vrabel <dvrabel@arcom.com>

[PATCH] handle errors returned by platform_get_irq*()

platform_get_irq*() now returns on -ENXIO when the resource cannot be
found. Ensure all users of platform_get_irq*() handle this error
appropriately.

Signed-off-by: David Vrabel <dvrabel@arcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


# 2876ba43 05-Jan-2006 Russell King <rmk@arm.linux.org.uk>

[PATCH] Add SA1111 bus_type probe/remove methods

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


# 45e109d0 16-Nov-2005 Russell King <rmk@dyn-67.arm.linux.org.uk>

[ARM] sa1111.c needs asm/sizes.h

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>


# 1b12050f 16-Nov-2005 Russell King <rmk@dyn-67.arm.linux.org.uk>

[ARM] Move zone adjustment for SA1111 on SA11x0 platforms

Unfortunately, using PAGE_SHIFT in asm/arch/memory.h is unsafe, and we
can't include asm/page.h into this file because then we have a circular
dependency. Move the offending code to arch/arm/common/sa1111.c
instead.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>


# 72724382 15-Nov-2005 Russell King <rmk@dyn-67.arm.linux.org.uk>

[ARM] Initialise SA1111 core before SA1111 PCMCIA

This avoids a BUG_ON with kref.c when SA1111 tries to register
a driver with an unregistered bus type.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>


# 3ae5eaec 09-Nov-2005 Russell King <rmk@dyn-67.arm.linux.org.uk>

[DRIVER MODEL] Convert platform drivers to use struct platform_driver

This allows us to eliminate the casts in the drivers, and eventually
remove the use of the device_driver function pointer methods for
platform device drivers.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Acked-by: Greg Kroah-Hartman <gregkh@suse.de>


# d052d1be 29-Oct-2005 Russell King <rmk@dyn-67.arm.linux.org.uk>

Create platform_device.h to contain all the platform device details.
Convert everyone who uses platform_bus_type to include
linux/platform_device.h.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Acked-by: Greg Kroah-Hartman <gregkh@suse.de>


# 9480e307 28-Oct-2005 Russell King <rmk@arm.linux.org.uk>

[PATCH] DRIVER MODEL: Get rid of the obsolete tri-level suspend/resume callbacks

In PM v1, all devices were called at SUSPEND_DISABLE level. Then
all devices were called at SUSPEND_SAVE_STATE level, and finally
SUSPEND_POWER_DOWN level. However, with PM v2, to maintain
compatibility for platform devices, I arranged for the PM v2
suspend/resume callbacks to call the old PM v1 suspend/resume
callbacks three times with each level in order so that existing
drivers continued to work.

Since this is obsolete infrastructure which is no longer necessary,
we can remove it. Here's an (untested) patch to do exactly that.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


# 7801907b 04-Sep-2005 Russell King <rmk@dyn-67.arm.linux.org.uk>

[ARM] Change irq_chip wake/type methods to set_wake/set_type

This is part of Thomas Gleixner's generic IRQ patch, which converts
ARM to use the generic IRQ subsystem. Here, we rename two of the
irq_chip methods - wake becomes set_wake, and type becomes set_type.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>


# 522c37b9 22-Jun-2005 Russell King <rmk@dyn-67.arm.linux.org.uk>

[PATCH] ARM: Fix sa1111.c build error caused by klist changes

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>


# 1da177e4 16-Apr-2005 Linus Torvalds <torvalds@ppc970.osdl.org>

Linux-2.6.12-rc2

Initial git repository build. I'm not bothering with the full history,
even though we have it. We can create a separate "historical" git
archive of that later if we want to, and in the meantime it's about
3.2GB when imported into git - space that would just make the early
git days unnecessarily complicated, when we don't have a lot of good
infrastructure for it.

Let it rip!