aboutsummaryrefslogtreecommitdiff
path: root/arch/sh/include
AgeCommit message (Collapse)AuthorFilesLines
2021-12-27Finish conversion of CONFIG_SYS_CLK_FREQ to KconfigTom Rini1-1/+1
In order to finish moving this symbol to Kconfig for all platforms, we need to do a few more things. First, for all platforms that define this to a function, introduce CONFIG_DYNAMIC_SYS_CLK_FREQ, similar to CONFIG_DYNAMIC_DDR_CLK_FREQ and populate clock_legacy.h. This entails also switching all users from CONFIG_SYS_CLK_FREQ to get_board_sys_clk() and updating a few preprocessor tests. With that done, all platforms that define a value here can be converted to Kconfig, and a fall-back of zero is sufficiently safe to use (and what is used today in cases where code may or may not have this available). Make sure that code which calls this function includes <clock_legacy.h> to get the prototype. Signed-off-by: Tom Rini <trini@konsulko.com>
2021-04-22lmb: move CONFIG_LMB in KconfigPatrick Delaunay1-2/+0
Migrate CONFIG_LMB in Kconfig. Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
2021-02-15sh: Remove sh7757lcr boardTom Rini4-312/+1
This board has not been converted to CONFIG_DM by the deadline of v2020.01 and is missing other conversions which depend on this as well. Remove it. As this is the last SH4A board, remove that support as well. Cc: Marek Vasut <marek.vasut+renesas@gmail.com> Signed-off-by: Tom Rini <trini@konsulko.com>
2021-01-05arc: m68k: nds32: nios2: sh: xtensa: Add empty spl.h headerSimon Glass1-0/+0
At present it is not possible to include spl.h in on these architectures since the asm/spl.h file is not present. We want to be able to use the spl_phase() function, so add empty headers to make things build. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-02-20dma-mapping: add <asm/dma-mapping.h> for all architecturesMasahiro Yamada1-0/+1
To avoid "asm/dma-mapping.h: No such file or directory" error, we need something. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2019-09-02sh: r2dplus: Enable OF controlMarek Vasut1-0/+2
Enable OF control for SH4 R2Dplus board. This is necessary, because the PCI uclass is designed in a way that makes it depend on DT and disallows instanciating devices without DT (e.g. with platdata). Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com> Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
2019-09-02sh: tmu: Fix SH4 TCNT0 offsetMarek Vasut1-1/+1
Fix the offset of TCNT0 register, which is 0xc on SH4. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com> Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
2019-05-10sh: sh3: Remove CPU supportMarek Vasut5-351/+0
This CPU core is old, no boards using the CPU are left in mainline, it has no prospects of ever being converted to DM, drop it. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com> Cc: Chris Brandt <chris.brandt@renesas.com> Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org> Cc: Vladimir Zapolskiy <vz@mleia.com> Cc: Yoshihiro Shimoda <shimoda.yoshihiro.uh@renesas.com>
2019-05-10sh: sh2: Remove CPU supportMarek Vasut6-143/+1
This CPU core is old, no boards using the CPU are left in mainline, it has no prospects of ever being converted to DM, drop it. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com> Cc: Chris Brandt <chris.brandt@renesas.com> Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org> Cc: Vladimir Zapolskiy <vz@mleia.com> Cc: Yoshihiro Shimoda <shimoda.yoshihiro.uh@renesas.com>
2019-05-07sh: 7785: Remove CPU supportMarek Vasut2-121/+0
There are no more boards using this CPU and there is no prospect of any boards showing up soon, remove it. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com> Cc: Chris Brandt <chris.brandt@renesas.com> Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org> Cc: Vladimir Zapolskiy <vz@mleia.com> Cc: Yoshihiro Shimoda <shimoda.yoshihiro@renesas.com>
2019-05-07sh: 7724: Remove CPU supportMarek Vasut2-211/+0
There are no more boards using this CPU and there is no prospect of any boards showing up soon, remove it. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com> Cc: Chris Brandt <chris.brandt@renesas.com> Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org> Cc: Vladimir Zapolskiy <vz@mleia.com> Cc: Yoshihiro Shimoda <shimoda.yoshihiro@renesas.com>
2019-02-07sh: bitops: add hweight*() macrosVignesh R1-0/+4
Add hweight*() macros required for moving to new SF layer Signed-off-by: Vignesh R <vigneshr@ti.com> Reviewed-by: Jagan Teki <jagan@openedev.com>
2018-09-15sh: tmu: Zap get_tbclk and timer_read_counterMarek Vasut1-0/+9
Replace those two functions with generic ones by defining the timer macros in include/config/*.h . Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
2018-09-15sh: sh7724: Drop EDMR macroMarek Vasut1-3/+0
Drop the macro as it is never used and it collides with sh_eth.h macros. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com> Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
2018-09-10arch: types.h: factor out fixed width typedefs to int-ll64.hMasahiro Yamada1-32/+2
All architectures have the same definition for s8/16/32/64 and u8/16/32/64. Factor out the duplicated code into <asm-generic/int-ll64.h>. BTW, Linux unified the kernel space definition into int-ll64.h a few years ago as you see in Linux commit 0c79a8e29b5f ("asm/types.h: Remove include/asm-generic/int-l64.h"). Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2018-05-07SPDX: Convert all of our single license tags to Linux Kernel styleTom Rini24-48/+24
When U-Boot started using SPDX tags we were among the early adopters and there weren't a lot of other examples to borrow from. So we picked the area of the file that usually had a full license text and replaced it with an appropriate SPDX-License-Identifier: entry. Since then, the Linux Kernel has adopted SPDX tags and they place it as the very first line in a file (except where shebangs are used, then it's second line) and with slightly different comment styles than us. In part due to community overlap, in part due to better tag visibility and in part for other minor reasons, switch over to that style. This commit changes all instances where we have a single declared license in the tag as both the before and after are identical in tag contents. There's also a few places where I found we did not have a tag and have introduced one. Signed-off-by: Tom Rini <trini@konsulko.com>
2018-02-23sh: Do not provide strncmpTom Rini1-31/+2
With modern GCC, we get warnings such as: cmd/jffs2.c: In function 'mtdparts_init': arch/sh/include/asm/string.h:110:38: warning: array subscript is above array bounds [-Warray-bounds] : "0" (__cs), "1" (__ct), "r" (__cs+__n) ~~~~^~~~ This results in a small size reduction as well. Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org> Signed-off-by: Tom Rini <trini@konsulko.com>
2017-10-02sh: Use asm-generic/io.hPaul Burton1-28/+1
Convert the sh architecture to make use of the new asm-generic/io.h to provide address mapping functions. As the generic implementations are suitable for sh this is primarily a matter of moving code. Feedback from architecture maintainers is welcome. Signed-off-by: Paul Burton <paul.burton@imgtec.com> Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
2016-12-02sh4: remove __io config options from r2dplus and r7780mp boardsVladimir Zapolskiy1-10/+0
Defined __io is no-op for the SH architecture and it can be removed from board files without any functional change. Signed-off-by: Vladimir Zapolskiy <vz@mleia.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2016-12-02sh4: cache: move exported cache manipulation functions into cache.cVladimir Zapolskiy1-2/+0
No functional change, moving cache manipulation functions into cache.c allows to collect all of them in a single location and as a pleasant side effect cache_control() function can be unexported now. Signed-off-by: Vladimir Zapolskiy <vz@mleia.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2016-10-19efi: Use asmlinkage for EFIAPISimon Glass1-0/+0
This is required for x86 and is also correct for ARM (since it is empty). Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Signed-off-by: Alexander Graf <agraf@suse.de>
2016-09-23Remove arch/${ARCH}/include/asm/errno.hMasahiro Yamada1-1/+0
Unlike Linux, nothing about errno.h is arch-specific in U-Boot. As you see, all of arch/${ARCH}/include/asm/errno.h is just a wrapper of <asm-generic/errno.h>. Actually, U-Boot does not export headers to user-space, so we just have to care about the consistency in the U-Boot tree. Now all of include directives for <asm/errno.h> are gone. Deprecate <asm/errno.h>. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Acked-by: Alexey Brodkin <abrodkin@synopsys.com>
2016-07-14arm, nds32, sh: remove useless ioremap()/iounmap() definesMasahiro Yamada1-33/+0
These defines are valid only when iomem_valid_addr is defined, but I do not see such defines anywhere. Remove. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2016-05-27Drop references to CONFIG_SYS_GENERIC_BOARD in config filesSimon Glass1-2/+0
This option is no longer used so need not be enabled. Signed-off-by: Simon Glass <sjg@chromium.org>
2016-05-27sh: Drop the arch-specific board initSimon Glass1-0/+2
It is well past the deadline for conversion to generic board init. Remove the old code. Please test this and perhaps send a follow-up patch if needed. Signed-off-by: Simon Glass <sjg@chromium.org>
2016-05-27sh: Fix build errors for generic boardSimon Glass1-10/+2
This includes the following fixes: - Define needed __init_end symbol - see initr_reloc_global_data() - Drop SH-specific struct bd_info - Add an empty relocate_code() function This prevents build errors with generic board, but the code will still need work. Perhaps this is a better alternative than deleting the code. Signed-off-by: Simon Glass <sjg@chromium.org>
2016-01-19Add more SPDX-License-Identifier tagsTom Rini1-3/+1
In a number of places we had wordings of the GPL (or LGPL in a few cases) license text that were split in such a way that it wasn't caught previously. Convert all of these to the correct SPDX-License-Identifier tag. Signed-off-by: Tom Rini <trini@konsulko.com>
2015-11-05sh: Use the generic bitops headersFabio Estevam1-0/+5
The generic bitops headers are required when calling logarithmic functions, such as ilog2(). Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Heiko Schocher <hs@denx.de>
2014-12-08Replace <compiler.h> with <linux/compiler.h>Masahiro Yamada1-1/+1
Including <linux/compiler.h> is enough for general use. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
2014-11-13sh: move CONFIG_{SH2, SH2A, SH3, SH4} to KconfigMasahiro Yamada2-5/+5
This commit moves CONFIG_SH2, CONFIG_SH2A, CONFIG_SH3, CONFIG_SH4 to Kconfig renaming into CONFIG_CPU_SH2, CONFIG_CPU_SH2A, CONFIG_CPU_SH3, CONFIG_CPU_SH4, respectively because arch/sh/Kconfig of Linux uses CONFIG_CPU_SH* convention. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Cc: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com> Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
2014-05-12bd_info: remove bi_barudrate member from struct bd_infoMasahiro Yamada1-1/+0
gd->bd->bi_baudrate is a copy of gd->baudrate. Since baudrate is a common feature for all architectures, keep gd->baudrate only. It is true that bi_baudrate was passed to the kernel in that structure but it was a long time ago. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Cc: Tom Rini <trini@ti.com> Cc: Simon Glass <sjg@chromium.org> Cc: Wolfgang Denk <wd@denx.de> Cc: Heiko Schocher <hs@denx.de> Acked-by: Michal Simek <monstr@monstr.eu> (For microblaze)
2014-03-14sh: fix PFC registers definition for SH772{2, 3, 4}Baruch Siach3-6/+9
Add missing port X data register, and fix the offset of ports Y and Z. Signed-off-by: Baruch Siach <baruch@tkos.co.il> Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
2014-01-09sh: sh2: Remove CONFIG_SH2A definition from asm/processor.hNobuhiro Iwamatsu1-2/+1
SH2 and SH2A use a common header. Both checks are not necessary. This removes CONFIG_SH2A definition from asm/processor.h. Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
2014-01-09sh: sh4: Remove CONFIG_SH4A definition from source codeNobuhiro Iwamatsu2-5/+4
SH4 and SH4A are compatible. But some instructions are different from these. In Linux kernel, It is treated as a separate CPU, but for now, I think that there is no need to divide especially in the U-Boot. This removes CONFIG_SH4A definition from source code, SH4A is treated as SH4. And this fix white space. Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
2013-12-18sh: add support for sh7753evb boardYoshihiro Shimoda2-0/+199
The SH7753 EVB board has SH7753, 512MB DDR3-SDRAM, SPI ROM, Gigabit Ethernet, and eMMC. This patch support the following functions: - 512MB DDR3-SDRAM, SCIF4, SPI ROM, Gigabit Ethernet, eMMC Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
2013-10-17sh: cache: Change cache API to defines as U-BootNobuhiro Iwamatsu1-3/+0
A chache API of SH is developped by reference in linux kernel. And API was the same as the linux kernel. This patch change cache API to defines as U-Boot. Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com> Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
2013-07-24Add GPL-2.0+ SPDX-License-Identifier to source filesWolfgang Denk22-325/+22
Signed-off-by: Wolfgang Denk <wd@denx.de> [trini: Fixup common/cmd_io.c] Signed-off-by: Tom Rini <trini@ti.com>
2013-03-15Introduce generic link section.h symbol filesSimon Glass1-0/+27
We create a separate header file for link symbols defined by the link scripts. It is helpful to have these all in one place and try to make them common across architectures. Since Linux already has a similar file, we bring this in even though many of the symbols there are not relevant to us. Each architecture has its own asm/sections.h where symbols specifc to that architecture can be added. For now everything except AVR32 just includes the generic header. One change is needed in arch/avr32/lib/board.c to make this conversion work. Reviewed-by: Tom Rini <trini@ti.com> (version 5) Signed-off-by: Simon Glass <sjg@chromium.org>
2013-02-04sh: Use generic global_dataSimon Glass1-19/+1
Move sh over to use generic global_data. Signed-off-by: Simon Glass <sjg@chromium.org>
2013-02-01Add architecture-specific global dataSimon Glass1-0/+5
We plan to move architecture-specific data into a separate structure so that we can make the rest of it common. As a first step, create struct arch_global_data to hold these fields. Initially it is empty. This patch applies to all archs at once. I can split it if this is really a pain. Signed-off-by: Simon Glass <sjg@chromium.org>
2012-12-20sh: add support for sh7752evb boardYoshihiro Shimoda2-0/+213
The R0P7752C00000RZ board has SH7752, 512MB DDR3-SDRAM, SPI ROM, Gigabit Ethernet, and eMMC. This patch supports the following functions: - 512MB DDR3-SDRAM, SCIF4, SPI ROM, Gigabit Ethernet, eMMC Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
2012-11-30sh: fix trigger_address_error()Yoshihiro Shimoda1-1/+1
The function should set BL bit, but it should not clear other flags. So, the patch uses set_bl_bit() instead of a local asm code. Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
2012-10-19sh: Change bi_baudrate and global data baudrate to intSimon Glass2-2/+2
These don't need to be longs, so change them. Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: Tom Rini <trini@ti.com>
2012-08-21sh: tmu: Removed arch/sh/include/asm/clk.hNobuhiro Iwamatsu1-30/+0
asm/clk.h was included get_peripheral_clk_rate function. But this is not used from anywhere. This removed asm/clk.h, and deleted include line from arch/sh/lib/time.c Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com> Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
2012-08-21sh: tmu: Changed TMU driver using array of structuresNobuhiro Iwamatsu13-139/+11
This changed into access using array of structure from access to the register using the definition of the register by macro. And removed white space. Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com> Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
2012-08-09global_data: unify global flag definesMike Frysinger1-8/+1
All the global flag defines are the same across all arches. So unify them in one place, and add a simple way for arches to extend for their needs. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-05-28sh: Add SH7269 device and RSK2+SH7269 boardPhil Edworthy2-0/+28
This is an sh2a device (max 266MHz) with FPU, video display controller (VDC), 8 serial ports, 4 I2C channels, 3 CAN ports, SD and on-chip USB. The RSK2+SH7269 board uses the SH7269 processor. It is often referred to as just rsk7269. Signed-off-by: Phil Edworthy <phil.edworthy@renesas.com> Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
2012-05-28sh: Add register definition of PFC for SH7734Nobuhiro Iwamatsu1-0/+27
Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com> Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
2012-05-28sh: Add bit control functionsNobuhiro Iwamatsu1-3/+40
This provide bit control functions as clrbits_*, setbits_* and clrsetbits_*. V2: Fix comment style and error of whitespace. Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com> Acked-by: Heiko Schocher <hs@denx.de> Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
2012-05-28sh: Add support Renesas SH7734Nobuhiro Iwamatsu2-0/+45
Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com> Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>