aboutsummaryrefslogtreecommitdiff
path: root/arch/mips/ralink/rt305x.c
AgeCommit message (Collapse)AuthorFilesLines
2023-06-21mips: ralink: introduce commonly used remap node functionShiji Yang1-9/+0
The ralink_of_remap() function is repeated several times on SoC specific source files. They have the same structure, but just differ in compatible strings. In order to make commonly use of these codes, this patch introduces a newly designed mtmips_of_remap_node() function to match and remap all supported system controller and memory controller nodes. Build and run tested on MT7620 and MT7628. Signed-off-by: Shiji Yang <[email protected]> Reviewed-by: Sergio Paracuellos <[email protected]> Signed-off-by: Thomas Bogendoerfer <[email protected]>
2023-06-21mips: ralink: rt305x: remove clock related codeSergio Paracuellos1-78/+0
A properly clock driver for ralink SoCs has been added. Hence there is no need to have clock related code in 'arch/mips/ralink' folder anymore. Signed-off-by: Sergio Paracuellos <[email protected]> Signed-off-by: Thomas Bogendoerfer <[email protected]>
2023-03-14mips: ralink: rt305x: introduce 'soc_device' initializationSergio Paracuellos1-0/+46
RT305x SoCs have their own 'ralink_soc_info' structure with some information about the soc itself. In order to be able to retrieve this information from driver code and avoid architecture dependencies for retrieving these details introduce this 'soc_device'. Set 'data' pointer points to the struct 'ralink_soc_info' to be able to export also current soc information using this mechanism. We need to select 'SOC_BUS' in Kconfig configuration for these SoCs. Signed-off-by: Sergio Paracuellos <[email protected]> Signed-off-by: Thomas Bogendoerfer <[email protected]>
2023-03-14mips: ralink: rt305x: soc queries and tests as functionsSergio Paracuellos1-20/+77
Move the SoC register value queries and tests to specific functions, to remove repetition of logic. No functional changes intended Signed-off-by: Sergio Paracuellos <[email protected]> Signed-off-by: Thomas Bogendoerfer <[email protected]>
2023-03-14mips: ralink: rt305x: define RT305X_SYSC_BASE with __iomemSergio Paracuellos1-5/+3
So that RT305X_SYSC_BASE can be used later in multiple functions without needing to repeat this __iomem declaration each time Signed-off-by: Sergio Paracuellos <[email protected]> Signed-off-by: Thomas Bogendoerfer <[email protected]>
2021-06-07pinctrl: ralink: move RT305X SoC pinmux config into a new 'pinctrl-rt305x.c' ↵Sergio Paracuellos1-77/+0
file Move all related code for SoC RT305X into a new driver located in 'pinctrl-rt305x.c' source file. Signed-off-by: Sergio Paracuellos <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Linus Walleij <[email protected]>
2021-03-29MIPS: ralink: annotate prom_soc_init() with __initIlya Lipnitskiy1-1/+1
prom_soc_init is only called from prom_init in arch/mips/ralink/prom.c, which is already annotated with __init, so annotate prom_soc_init with __init too. Signed-off-by: Ilya Lipnitskiy <[email protected]> Signed-off-by: Thomas Bogendoerfer <[email protected]>
2019-06-19treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500Thomas Gleixner1-3/+1
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 <[email protected]> Reviewed-by: Enrico Weigelt <[email protected]> Reviewed-by: Kate Stewart <[email protected]> Reviewed-by: Allison Randal <[email protected]> Cc: [email protected] Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2018-08-30MIPS: ralink: Add rt3352 SPI_CS1 pinmuxMathias Kresin1-0/+5
The rt3352 has a pin that can be used as second spi chip select, watchdog reset or GPIO. The pinmux setup was missing the definition of said pin. The pin is configured via the same bit on rt5350, so reuse the existing macro. Signed-off-by: Mathias Kresin <[email protected]> Signed-off-by: Paul Burton <[email protected]> Patchwork: https://patchwork.linux-mips.org/patch/20301/ Cc: John Crispin <[email protected]> Cc: Ralf Baechle <[email protected]> Cc: James Hogan <[email protected]> Cc: [email protected] Cc: [email protected]
2017-02-14MIPS: Audit and remove any unnecessary uses of module.hPaul Gortmaker1-1/+2
Historically a lot of these existed because we did not have a distinction between what was modular code and what was providing support to modules via EXPORT_SYMBOL and friends. That changed when we forked out support for the latter into the export.h file. This means we should be able to reduce the usage of module.h in code that is obj-y Makefile or bool Kconfig. In the case of some code where it is modular, we can extend that to also include files that are building basic support functionality but not related to loading or registering the final module; such files also have no need whatsoever for module.h The advantage in removing such instances is that module.h itself sources about 15 other headers; adding significantly to what we feed cpp, and it can obscure what headers we are effectively using. Since module.h might have been the implicit source for init.h (for __init) and for export.h (for EXPORT_SYMBOL) we consider each instance for the presence of either and replace/add as needed. Also note that MODULE_DEVICE_TABLE is a no-op for non-modular code. Build coverage of all the mips defconfigs revealed the module.h header was masking a couple of implicit include instances, so we add the appropriate headers there. Signed-off-by: Paul Gortmaker <[email protected]> Cc: David Daney <[email protected]> Cc: John Crispin <[email protected]> Cc: Ralf Baechle <[email protected]> Cc: "Steven J. Hill" <[email protected]> Cc: [email protected] Patchwork: https://patchwork.linux-mips.org/patch/15131/ [[email protected]: Preserve sort order where it already exists] Signed-off-by: James Hogan <[email protected]>
2017-01-25MIPS: ralink: Remove unused rt*_wdt_reset functionsArnd Bergmann1-11/+0
All pointers to these functions were removed, so now they produce warnings: arch/mips/ralink/rt305x.c:92:13: error: 'rt305x_wdt_reset' defined but not used [-Werror=unused-function] This removes the functions. If we need them again, the patch can be reverted later. Fixes: f576fb6a0700 ("MIPS: ralink: cleanup the soc specific pinmux data") Signed-off-by: Arnd Bergmann <[email protected]> Cc: John Crispin <[email protected]> Cc: Colin Ian King <[email protected]> Cc: [email protected] Cc: [email protected] Patchwork: https://patchwork.linux-mips.org/patch/15044/ Signed-off-by: Ralf Baechle <[email protected]>
2017-01-03MIPS: ralink: Add missing I2C and I2S clocks.John Crispin1-0/+2
This patch adds two additional clocks required by the audio interface of the SoCs. Signed-off-by: John Crispin <[email protected]> Cc: [email protected] Patchwork: https://patchwork.linux-mips.org/patch/14897/ Signed-off-by: Ralf Baechle <[email protected]>
2016-05-13MIPS: Change my email addressJohn Crispin1-1/+1
The old address is no longer valid. Use the my new one instead. Signed-off-by: John Crispin <[email protected]> Cc: [email protected] Patchwork: https://patchwork.linux-mips.org/patch/13201/ Signed-off-by: Ralf Baechle <[email protected]>
2016-01-20MIPS: ralink: Add a few missing clocksJohn Crispin1-0/+1
Signed-off-by: John Crispin <[email protected]> Cc: [email protected] Patchwork: https://patchwork.linux-mips.org/patch/11995/ Signed-off-by: Ralf Baechle <[email protected]>
2015-11-11MIPS: ralink: Add missing clock on rt305xJohn Crispin1-0/+1
The rt305x support is missing a clock required by the ethernet driver. Signed-off-by: John Crispin <[email protected]> Cc: [email protected] Patchwork: https://patchwork.linux-mips.org/patch/11447/ Signed-off-by: Ralf Baechle <[email protected]>
2015-11-11MIPS: ralink: Unify SoC id handlingJohn Crispin1-7/+5
This makes detection a lot easier for audio, wifi, ... drivers. Signed-off-by: John Crispin <[email protected]> Cc: [email protected] Patchwork: https://patchwork.linux-mips.org/patch/11440/ Signed-off-by: Ralf Baechle <[email protected]>
2014-11-24MIPS: ralink: cleanup the soc specific pinmux dataJohn Crispin1-85/+68
Before we had a pinctrl driver we used a custom OF api. This patch converts the soc specific pinmux data to a new set of structs. We also add some new pinmux setings. Signed-off-by: John Crispin <[email protected]> Patchwork: http://patchwork.linux-mips.org/patch/8009/ Signed-off-by: Ralf Baechle <[email protected]>
2013-10-29MIPS: Panic messages should not end in \n.Ralf Baechle1-1/+1
Panic() is going to add a \n itself and it's annoying if a panic message rolls of the screen on a device with no scrollback. Signed-off-by: Ralf Baechle <[email protected]>
2013-05-08MIPS: ralink: add memory definition for RT305xJohn Crispin1-0/+45
Populate struct soc_info with the data that describes our RAM window. As memory detection fails on RT5350 we read the amount of available memory from the system controller. Signed-off-by: John Crispin <[email protected]> Patchwork: http://patchwork.linux-mips.org/patch/5180/
2013-05-08MIPS: ralink: add uart mask to struct ralink_pinmuxJohn Crispin1-2/+3
Add a field for the uart muxing mask and set it inside the rt305x setup code. Signed-off-by: John Crispin <[email protected]> Patchwork: http://patchwork.linux-mips.org/patch/5744/
2013-05-08MIPS: ralink: make the RT305x pinmuxing structure staticJohn Crispin1-3/+3
These structures are exported via struct ralink_pinmux rt_gpio_pinmux and can hence be static. Signed-off-by: John Crispin <[email protected]> Patchwork: http://patchwork.linux-mips.org/patch/5172/
2013-05-08MIPS: ralink: rename gpio_pinmux to rt_gpio_pinmuxJohn Crispin1-1/+1
Add proper namespacing to the variable. Signed-off-by: John Crispin <[email protected]> Patchwork: http://patchwork.linux-mips.org/patch/5171/
2013-05-08MIPS: ralink: fix RT305x clock setupJohn Crispin1-0/+12
Add a few missing clocks. Signed-off-by: John Crispin <[email protected]> Acked-by: Gabor Juhos <[email protected]> Patchwork: http://patchwork.linux-mips.org/patch/5167/
2013-02-17MIPS: ralink: adds support for RT305x SoC familyJohn Crispin1-0/+242
Add support code for rt3050, rt3052, rt3350, rt3352 and rt5350 SOC. The code detects the SoC and registers the clk / pinmux settings. Signed-off-by: John Crispin <[email protected]> Signed-off-by: Gabor Juhos <[email protected]> Patchwork: http://patchwork.linux-mips.org/patch/4896/