History log of /linux-master/arch/arm/mach-omap1/common.h
Revision Date Author Comments
# 9a99b142 04-Jan-2023 Arnd Bergmann <arnd@arndb.de>

ARM: omap1: merge omap1_map_io functions

The OMAP15xx/OMAP16xx variants are exactly the same, so merge them
into one.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>


# 8825acd7 29-Sep-2022 Arnd Bergmann <arnd@arndb.de>

ARM: omap1: remove dead code

After the removal of the unused board files, I went through the
omap1 code to look for code that no longer has any callers
and remove that.

In particular, support for the omap7xx/omap8xx family is now
completely unused, so I'm only leaving omap15xx/omap16xx/omap59xx.

Cc: Aaro Koskinen <aaro.koskinen@iki.fi>
Cc: Janusz Krzysztofik <jmkrzyszt@gmail.com>
Cc: linux-omap@vger.kernel.org
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Acked-by: Tony Lindgren <tony@atomide.com>
Acked-by: Kevin Hilman <khilman@baylibre.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>


# 7e0a9e62 06-Aug-2019 Arnd Bergmann <arnd@arndb.de>

ARM: omap1: move mach/*.h into mach directory

Most of the header files are no longer referenced from outside
arch/arm/mach-omap1, so move them all to that place directly
and change their users to use the new location.

The exceptions are:

- mach/compress.h is used by the core architecture code
- mach/serial.h is used by mach/compress.h

The mach/memory.h is empty and gets removed in the process,
avoiding the need for CONFIG_NEED_MACH_MEMORY_H.

Acked-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>


# 47bd59e5 06-Sep-2018 Boris Brezillon <bbrezillon@kernel.org>

mtd: rawnand: plat_nand: Pass a nand_chip object to all platform_nand_ctrl hooks

Let's make the raw NAND API consistent by patching all helpers and
hooks to take a nand_chip object instead of an mtd_info one or
remove the mtd_info object when both are passed.

In order to do that, we first need to update the platform_nand_ctrl
hooks to take a nand_chip object instead of an mtd_info.

We add temporary plat_nand_xxx() wrappers to the do the mtd -> chip
conversion, but those will be dropped when patching nand_chip hooks to
take a nand_chip object.

Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>
Reviewed-by: Alexander Sverdlin <alexander.sverdlin@gmail.com>
Acked-by: Alexander Sverdlin <alexander.sverdlin@gmail.com>
Acked-by: Robert Jarzmik <robert.jarzmik@free.fr>
Acked-by: Krzysztof Halasa <khalasa@piap.pl>
Acked-by: Paul Burton <paul.burton@mips.com>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>


# 79fc540f 19-Apr-2018 Wolfram Sang <wsa@kernel.org>

i2c: omap: move header to platform_data

This header only contains platform_data. Move it to the proper directory.

Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Acked-by: Tony Lindgren <tony@atomide.com>


# 9138f89e 12-Feb-2018 Suman Anna <s-anna@ti.com>

ARM: OMAP: Move plat/i2c.h into mach-omap1 folder

The current contents of plat/i2c.h are only relevant for OMAP1
platforms, as all the equivalent functions for OMAP2 has been
dropped in commit 65fa3e719f36 ("ARM: OMAP2+: Remove legacy i2c.c
platform init code"), and which has also moved the left-over code
from plat-omap into mach-omap1. The hwmod is a concept only
applicable for OMAP2 platforms, and the omap_i2c_reset() is
already declared in mach-omap2/i2c.h. So, move the current
plat/i2c.h header file into the mach-omap1 folder, and adjust
the header usage accordingly.

Signed-off-by: Suman Anna <s-anna@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>


# e99b32e2 21-May-2015 Tony Lindgren <tony@atomide.com>

ARM: OMAP1: Fix randconfig builds if ARCH_OMAP15XX not selected

With the omap1 SPARSE_IRQ changes mach/irqs.h is no longer
automatically included. Turns out now we rely on ARCH_OMAP15XX
including hardware.h from memory.h, so without ARCH_OMAP15XX
we get build failures.

As we have legacy drivers still relying on these indirect
includes, let's not add more mach includes to the drivers.
Those have to be removed anyways for multiplatform support.

Let's fix up mach-omap1 to include soc.h where cpu_is_omap
checks are done, and common.h for board-*.c files.

But let's keep the indirect memory.h include for now to avoid
unnecessary churn in the drivers.

Signed-off-by: Tony Lindgren <tony@atomide.com>


# b694331c 20-May-2015 Tony Lindgren <tony@atomide.com>

ARM: omap1: Switch to use MULTI_IRQ

This allows us to get a bit further with SPARSE_IRQ and
MULTIARCH support.

Note that we now also rename omap_irq_flags to omap_l2_irq
as that's the omap_irq_flags naming is confusing. It just
contains the interrupt number for the l2 irq.

Cc: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Tony Lindgren <tony@atomide.com>


# 8ff875e7 08-Oct-2013 Majunath Goudar <csmanjuvijay@gmail.com>

ARM: mach-omap1: Fix omap1510_fpga_init_irq() implicit declarations.

This patch adds a omap1510_fpga_init_irq() inline dummy implementations
in arch/arm/mach-omap1/common.h. Without this patch,build system can
lead to issues. This was discovered during randconfig testing,in which
other than CONFIG_ARCH_OMAP15XX was enabled the leading to the following
error:

CC arch/arm/mach-omap1/board-innovator.o
arch/arm/mach-omap1/board-innovator.c: In function ‘innovator_init’:
arch/arm/mach-omap1/board-innovator.c:377:3: error: implicit declaration of
function ‘omap1510_fpga_init_irq’ [-Werror=implicit-function-declaration]
cc1: some warnings being treated as errors
make[1]: *** [arch/arm/mach-omap1/board-innovator.o] Error 1
make: *** [arch/arm/mach-omap1] Error 2

Signed-off-by: Manjunath Goudar <csmanjuvijay@gmail.com>
Cc: Tony Lindgren <tony@atomide.com>
Cc: Russell King <linux@arm.linux.org.uk>
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-kernel@vger.kernel.org
Cc: linux-omap@vger.kernel.org
Signed-off-by: Tony Lindgren <tony@atomide.com>


# 7b6d864b 08-Jul-2013 Robin Holt <holt@sgi.com>

reboot: arm: change reboot_mode to use enum reboot_mode

Preparing to move the parsing of reboot= to generic kernel code forces
the change in reboot_mode handling to use the enum.

[akpm@linux-foundation.org: fix arch/arm/mach-socfpga/socfpga.c]
Signed-off-by: Robin Holt <holt@sgi.com>
Cc: Russell King <rmk+kernel@arm.linux.org.uk>
Cc: Russ Anderson <rja@sgi.com>
Cc: Robin Holt <holt@sgi.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Guan Xuetao <gxt@mprc.pku.edu.cn>
Acked-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>


# 0adcbaf7 11-Feb-2013 Tony Lindgren <tony@atomide.com>

ARM: OMAP1: Fix build related to kgdb.h no longer including serial_8250.h

Commit 16559ae4 (kgdb: remove #include <linux/serial_8250.h> from kgdb.h)
had a side effect of breaking omap1_defconfig build as some headers
were included indirectly:

arch/arm/mach-omap1/board-h2.c:249: error: ‘INT_KEYBOARD’ undeclared here (not in a function)
...

This worked earlier as linux/serial_8250.h included linux/serial_core.h,
via linux/serial_8250.h from linux/kgdb.h. Fix this by including the
necessary headers directly.

Signed-off-by: Tony Lindgren <tony@atomide.com>


# 6bb27d73 08-Nov-2012 Stephen Warren <swarren@nvidia.com>

ARM: delete struct sys_timer

Now that the only field in struct sys_timer is .init, delete the struct,
and replace the machine descriptor .timer field with the initialization
function itself.

This will enable moving timer drivers into drivers/clocksource without
having to place a public prototype of each struct sys_timer object into
include/linux; the intent is to create a single of_clocksource_init()
function that determines which timer driver to initialize by scanning
the device dtree, much like the proposed irqchip_init() at:
http://www.spinics.net/lists/arm-kernel/msg203686.html

Includes mach-omap2 fixes from Igor Grinberg.

Tested-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Stephen Warren <swarren@nvidia.com>


# 5c2e8852 29-Oct-2012 Tony Lindgren <tony@atomide.com>

ARM: OMAP: Remove plat-omap/common.h

Most of the prototypes in plat-omap/common.h are not
common to omap1 and omap2+, they are local to omap2+
and should not be in plat-omap/common.h.

The only shared function prototype in this file is
omap_init_clocksource_32k(), let's put that into
counter-32k.h.

Note that the new plat/counter-32k.h must not be
included from drivers, that will break omap2+ build
for CONFIG_MULTIPLATFORM.

Signed-off-by: Tony Lindgren <tony@atomide.com>


# 01480bad 30-Oct-2012 Tony Lindgren <tony@atomide.com>

ARM: OMAP: Fix relative includes for shared i2c.h file

As discussed on linux-arm-kernel, we want to avoid
relative includes for the arch/arm/*omap* shared code:

http://www.spinics.net/lists/linux-omap/msg80520.html

To fix this for the shared i2c.h, let's re-introduce
a minimal plat/i2c.h.

Note that drivers must not use this header as it will
break build for omap2+ CONFIG_MULTIPLATFORM builds.

Signed-off-by: Tony Lindgren <tony@atomide.com>


# 508c0d47 29-Oct-2012 Paul Walmsley <paul@pwsan.com>

ARM: OMAP1: CGRM: fix omap1_get_reset_sources() return type

An older version of the patch "ARM: OMAP1: create read_reset_sources()
function (for initial use by watchdog)" was sent upstream, which used
the wrong return type for the omap1_get_reset_sources() function.
Fix it to return a u32, which is what the WDTIMER platform_data
function pointer read_reset_sources() expects.

Signed-off-by: Paul Walmsley <paul@pwsan.com>


# b5c5353d 21-Oct-2012 Paul Walmsley <paul@pwsan.com>

ARM: OMAP1: create read_reset_sources() function (for initial use by watchdog)

On OMAP1, the existing OMAP watchdog driver reads a register directly
from a non-watchdog IP block. It also does not convert the register's
contents into the standard WDIOF_* bits expected from the
GETBOOTSTATUS ioctl().

To move towards fixing these problems, create an function in
arch/arm/mach-omap1 to return the reset source data. A subsequent
patch will provide this function to the watchdog driver via
platform_data.

In the long term, the best approach would be to move this function
to a new OMAP1 driver that handles access to the OMAP1 Clock
Generation and Reset Management IP block. Then no platform_data would
be needed.

Signed-off-by: Paul Walmsley <paul@pwsan.com>


# e6a6e5ad 27-Sep-2012 Tony Lindgren <tony@atomide.com>

ARM: OMAP: Make plat/common.h local to mach-omap1 and mach-omap2

We cannot keep this in plat/common.h for common zImage support.

Signed-off-by: Tony Lindgren <tony@atomide.com>


# 3a8761c0 08-Oct-2012 Tony Lindgren <tony@atomide.com>

ARM: OMAP: Split plat-omap/i2c.c into mach-omap1 and mach-omap2

There's no need to keep the device related things in the
common i2c.c as omap2+ is using hwmod. Split the code to
mach-omap1 and mach-omap2 parts and only leave common
code to plat-omap/i2c.c.

Note that as omap1 only has one i2c controller, we can
now remove the old device related macros.

Reviewed-by: Shubhrajyoti D <shubhrajyoti@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>


# 4c98dc6b 02-Oct-2012 Tony Lindgren <tony@atomide.com>

ARM: OMAP: Make plat/fpga.h local to arch/arm/plat-omap

There's no need to have this file in plat/fpga.h. We can
make it local to plat-omap replacing fpga_read/write
functions directly with readb/writeb as that's how
they are already defined in fpga.h.

Note that 2420 based H4 is also using the fpga, so let's
keep the led support around in plat-omap until we flip
over mach-omap2 to device tree.

Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
Cc: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Cc: linux-fbdev@vger.kernel.org
Cc: Felipe Balbi <balbi@ti.com>
Cc: linux-usb@vger.kernel.org
Signed-off-by: Tony Lindgren <tony@atomide.com>


# 121e1a73 10-May-2012 Paul Walmsley <paul@pwsan.com>

ARM: OMAP1: USB: fix ocpi_enable compile problem on non-1610 builds

Janusz Krzysztofik reported the following build break on OMAP1 builds that
don't include CONFIG_ARCH_OMAP16XX:

LD .tmp_vmlinux1
arch/arm/mach-omap1/built-in.o: In function `omap1_usb_init':
lcd_dma.c:(.init.text+0x1420): undefined reference to `ocpi_enable'
make: *** [.tmp_vmlinux1] Error 1

This was caused by commit d3645d39ad0ed9f09535065676ea0ba114f93cdf
("ARM: OMAP1: OHCI: use platform_data fn ptr to enable OCPI bus").
Fix by declaring an empty ocpi_enable() on non-16XX builds, which
should work until the OCPI code is moved out to drivers/.

Cc: Janusz Krzysztofik <jmkrzyszt@gmail.com>
Signed-off-by: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>


# 18799911 09-May-2012 Vaibhav Hiremath <hvaibhav@ti.com>

ARM: OMAP1: Add checks for possible error condition in timer_init

On OMAP1, omap_32k_timer_init() function always returns "true",
irrespective of whether error occurred while initializing 32k sync
counter as a kernel clocksource or not and execution will never
fallback to mpu_timer clocksource init code.

This patch adds check for return value from function
omap_init_clocksource_32k(), and fallback to omap_mpu_timer_init()
in case of failure/error from omap_init_clocksource_32k().

Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
Acked-by: Kevin Hilman <khilman@ti.com>
Tested-by: Kevin Hilman <khilman@ti.com>
Cc: Paul Walmsley <paul@pwsan.com>
Cc: Benoit Cousson <b-cousson@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>


# 82c3bd03 25-Apr-2012 Shawn Guo <shawn.guo@linaro.org>

ARM: omap1: use machine specific hook for late init

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Acked-by: Tony Lindgren <tony@atomide.com>


# 31cde044 13-Apr-2012 Paul Walmsley <paul@pwsan.com>

ARM: OMAP1: board files: deduplicate and clean some NAND-related code

The H2, H3, Perseus2, and FSample board files all contain the same
duplicated code to handle NAND commands. That code is missing
some casts around conversions from unsigned long to void __iomem *.

Consolidate the duplicated code into a new file,
arch/arm/mach-omap1/board-nand.c. Resolve the sparse warnings by
adding appropriate casts:

arch/arm/mach-omap1/board-h2.c:193:9: warning: incorrect type in argument 1 (different base types)
arch/arm/mach-omap1/board-h2.c:193:9: expected void const volatile [noderef] <asn:2>*<noident>
arch/arm/mach-omap1/board-h2.c:193:9: got unsigned long
arch/arm/mach-omap1/board-perseus2.c:157:9: warning: incorrect type in argument 1 (different base types)
arch/arm/mach-omap1/board-perseus2.c:157:9: expected void const volatile [noderef] <asn:2>*<noident>
arch/arm/mach-omap1/board-perseus2.c:157:9: got unsigned long
arch/arm/mach-omap1/board-fsample.c:199:9: warning: incorrect type in argument 1 (different base types)
arch/arm/mach-omap1/board-fsample.c:199:9: expected void const volatile [noderef] <asn:2>*<noident>
arch/arm/mach-omap1/board-fsample.c:199:9: got unsigned long
arch/arm/mach-omap1/board-h3.c:195:9: warning: incorrect type in argument 1 (different base types)
arch/arm/mach-omap1/board-h3.c:195:9: expected void const volatile [noderef] <asn:2>*<noident>
arch/arm/mach-omap1/board-h3.c:195:9: got unsigned long

Thanks to Arnd Bergmann <arnd@arndb.de> for suggesting a cleaner
implementation of omap1_nand_cmd_ctl(), avoiding some casts.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Cc: Brian Swetland <swetland@google.com>
Cc: Imre Deak <imre.deak@nokia.com>
Cc: Greg Lonnon <glonnon@ridgerun.com>
Cc: Kevin Hilman <kjh@hilman.org>
Cc: Kevin Hilman <khilman@ti.com>
Cc: Arnd Bergmann <arnd@arndb.de>


# 6f3c1af2 13-Apr-2012 Paul Walmsley <paul@pwsan.com>

ARM: OMAP1: OCPI: move to mach-omap1/

Move the OMAP1 OCPI "bus" code to arch/arm/mach-omap1, since it is
only used on OMAP1 devices. In the long term, it probably makes sense
to move the OCPI bus code to somewhere under drivers/.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Cc: Tony Lindgren <tony@atomide.com>


# e2ed89fc 13-Apr-2012 Paul Walmsley <paul@pwsan.com>

ARM: OMAP: add includes for missing prototypes

Several C files in arch/arm/mach-omap* and arch/arm/plat-omap declare
functions that are used by other files, but don't include the header
file where the prototype is declared. This results in the following
warnings from sparse:

arch/arm/mach-omap2/irq.c:114:5: warning: symbol 'omap_irq_pending' was not declared. Should it be static?
arch/arm/mach-omap2/irq.c:186:13: warning: symbol 'omap2_init_irq' was not declared. Should it be static?
arch/arm/mach-omap2/irq.c:191:13: warning: symbol 'omap3_init_irq' was not declared. Should it be static?
arch/arm/mach-omap2/irq.c:196:13: warning: symbol 'ti81xx_init_irq' was not declared. Should it be static?
arch/arm/mach-omap2/irq.c:233:39: warning: symbol 'omap2_intc_handle_irq' was not declared. Should it be static?
arch/arm/mach-omap2/irq.c:242:6: warning: symbol 'omap_intc_save_context' was not declared. Should it be static?
arch/arm/mach-omap2/irq.c:265:6: warning: symbol 'omap_intc_restore_context' was not declared. Should it be static?
arch/arm/mach-omap2/irq.c:291:6: warning: symbol 'omap3_intc_suspend' was not declared. Should it be static?
arch/arm/mach-omap2/irq.c:297:6: warning: symbol 'omap3_intc_prepare_idle' was not declared. Should it be static?
arch/arm/mach-omap2/irq.c:306:6: warning: symbol 'omap3_intc_resume_idle' was not declared. Should it be static?
arch/arm/mach-omap2/irq.c:312:39: warning: symbol 'omap3_intc_handle_irq' was not declared. Should it be static?
arch/arm/mach-omap2/omap-secure.c:59:12: warning: symbol 'omap_secure_ram_reserve_memblock' was not declared. Should it be static?
arch/arm/mach-omap2/board-zoom-display.c:133:13: warning: symbol 'zoom_display_init' was not declared. Should it be static?
arch/arm/plat-omap/common.c:73:13: warning: symbol 'omap_init_consistent_dma_size' was not declared. Should it be static?
arch/arm/mach-omap1/irq.c:61:5: warning: symbol 'omap_irq_flags' was not declared. Should it be static?
arch/arm/mach-omap1/irq.c:179:13: warning: symbol 'omap1_init_irq' was not declared. Should it be static?
arch/arm/mach-omap1/reset.c:11:6: warning: symbol 'omap1_restart' was not declared. Should it be static?

Fix by including the appropriate header files.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Cc: Santosh Shilimkar <santosh.shilimkar@ti.com>
Cc: Senthilvadivu Guruswamy <svadivu@ti.com>
Acked-by: Santosh Shilimkar <santosh.shilimkar@ti.com>


# a4f34197 24-Feb-2012 Tony Lindgren <tony@atomide.com>

ARM: OMAP: Move omap_init_consistent_dma_size() to local common.h

We don't want to keep it in io.h as we want to remove io.h
for omap2+ for the common zImage support.

Signed-off-by: Tony Lindgren <tony@atomide.com>


# baa95883 05-Nov-2011 Russell King <rmk+kernel@arm.linux.org.uk>

ARM: restart: omap: use new restart hook

Hook these platforms restart code into the new restart hook rather
than using arch_reset().

Acked-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>


# 4e65331c 10-Nov-2011 Tony Lindgren <tony@atomide.com>

ARM: 7159/1: OMAP: Introduce local common.h files

As suggested by Russell King - ARM Linux <linux@arm.linux.org.uk>,
there's no need to keep local prototypes in non-local headers.

Add mach-omap1/common.h and mach-omap2/common.h and move the
local prototypes there from plat/common.h and mach/omap4-common.h.

Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>