Commit 933b4f0f authored by Olof Johansson's avatar Olof Johansson

Merge tag 'renesas-fixes5-for-v3.12' of...

Merge tag 'renesas-fixes5-for-v3.12' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas into next/cleanup

From Simon Horman:

* Correct incorrect placement of __initdata tag in ape6evm board code

* tag 'renesas-fixes5-for-v3.12' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas:
  ARM: shmobile: ape6evm: fix incorrect placement of __initdata tag
  (+ other patches already present in v3.12-rc4)
Signed-off-by: default avatarOlof Johansson <olof@lixom.net>
parents 07d8a49c 40fca03c
...@@ -9,12 +9,15 @@ compulsory and any optional properties, common to all SD/MMC drivers, as ...@@ -9,12 +9,15 @@ compulsory and any optional properties, common to all SD/MMC drivers, as
described in mmc.txt, can be used. Additionally the following tmio_mmc-specific described in mmc.txt, can be used. Additionally the following tmio_mmc-specific
optional bindings can be used. optional bindings can be used.
Required properties:
- compatible: "renesas,sdhi-shmobile" - a generic sh-mobile SDHI unit
"renesas,sdhi-sh7372" - SDHI IP on SH7372 SoC
"renesas,sdhi-sh73a0" - SDHI IP on SH73A0 SoC
"renesas,sdhi-r8a73a4" - SDHI IP on R8A73A4 SoC
"renesas,sdhi-r8a7740" - SDHI IP on R8A7740 SoC
"renesas,sdhi-r8a7778" - SDHI IP on R8A7778 SoC
"renesas,sdhi-r8a7779" - SDHI IP on R8A7779 SoC
"renesas,sdhi-r8a7790" - SDHI IP on R8A7790 SoC
Optional properties: Optional properties:
- toshiba,mmc-wrprotect-disable: write-protect detection is unavailable - toshiba,mmc-wrprotect-disable: write-protect detection is unavailable
When used with Renesas SDHI hardware, the following compatibility strings
configure various model-specific properties:
"renesas,sh7372-sdhi": (default) compatible with SH7372
"renesas,r8a7740-sdhi": compatible with R8A7740: certain MMC/SD commands have to
wait for the interface to become idle.
...@@ -193,7 +193,7 @@ pfc: pfc@e6050000 { ...@@ -193,7 +193,7 @@ pfc: pfc@e6050000 {
}; };
sdhi0: sdhi@ee100000 { sdhi0: sdhi@ee100000 {
compatible = "renesas,r8a73a4-sdhi"; compatible = "renesas,sdhi-r8a73a4";
reg = <0 0xee100000 0 0x100>; reg = <0 0xee100000 0 0x100>;
interrupt-parent = <&gic>; interrupt-parent = <&gic>;
interrupts = <0 165 4>; interrupts = <0 165 4>;
...@@ -202,7 +202,7 @@ sdhi0: sdhi@ee100000 { ...@@ -202,7 +202,7 @@ sdhi0: sdhi@ee100000 {
}; };
sdhi1: sdhi@ee120000 { sdhi1: sdhi@ee120000 {
compatible = "renesas,r8a73a4-sdhi"; compatible = "renesas,sdhi-r8a73a4";
reg = <0 0xee120000 0 0x100>; reg = <0 0xee120000 0 0x100>;
interrupt-parent = <&gic>; interrupt-parent = <&gic>;
interrupts = <0 166 4>; interrupts = <0 166 4>;
...@@ -211,7 +211,7 @@ sdhi1: sdhi@ee120000 { ...@@ -211,7 +211,7 @@ sdhi1: sdhi@ee120000 {
}; };
sdhi2: sdhi@ee140000 { sdhi2: sdhi@ee140000 {
compatible = "renesas,r8a73a4-sdhi"; compatible = "renesas,sdhi-r8a73a4";
reg = <0 0xee140000 0 0x100>; reg = <0 0xee140000 0 0x100>;
interrupt-parent = <&gic>; interrupt-parent = <&gic>;
interrupts = <0 167 4>; interrupts = <0 167 4>;
......
...@@ -96,6 +96,5 @@ gpio4: gpio@ffc44000 { ...@@ -96,6 +96,5 @@ gpio4: gpio@ffc44000 {
pfc: pfc@fffc0000 { pfc: pfc@fffc0000 {
compatible = "renesas,pfc-r8a7778"; compatible = "renesas,pfc-r8a7778";
reg = <0xfffc000 0x118>; reg = <0xfffc000 0x118>;
#gpio-range-cells = <3>;
}; };
}; };
...@@ -188,7 +188,6 @@ i2c3: i2c@ffc73000 { ...@@ -188,7 +188,6 @@ i2c3: i2c@ffc73000 {
pfc: pfc@fffc0000 { pfc: pfc@fffc0000 {
compatible = "renesas,pfc-r8a7779"; compatible = "renesas,pfc-r8a7779";
reg = <0xfffc0000 0x23c>; reg = <0xfffc0000 0x23c>;
#gpio-range-cells = <3>;
}; };
thermal@ffc48000 { thermal@ffc48000 {
......
...@@ -148,11 +148,10 @@ mmcif1: mmcif@ee220000 { ...@@ -148,11 +148,10 @@ mmcif1: mmcif@ee220000 {
pfc: pfc@e6060000 { pfc: pfc@e6060000 {
compatible = "renesas,pfc-r8a7790"; compatible = "renesas,pfc-r8a7790";
reg = <0 0xe6060000 0 0x250>; reg = <0 0xe6060000 0 0x250>;
#gpio-range-cells = <3>;
}; };
sdhi0: sdhi@ee100000 { sdhi0: sdhi@ee100000 {
compatible = "renesas,r8a7790-sdhi"; compatible = "renesas,sdhi-r8a7790";
reg = <0 0xee100000 0 0x100>; reg = <0 0xee100000 0 0x100>;
interrupt-parent = <&gic>; interrupt-parent = <&gic>;
interrupts = <0 165 4>; interrupts = <0 165 4>;
...@@ -161,7 +160,7 @@ sdhi0: sdhi@ee100000 { ...@@ -161,7 +160,7 @@ sdhi0: sdhi@ee100000 {
}; };
sdhi1: sdhi@ee120000 { sdhi1: sdhi@ee120000 {
compatible = "renesas,r8a7790-sdhi"; compatible = "renesas,sdhi-r8a7790";
reg = <0 0xee120000 0 0x100>; reg = <0 0xee120000 0 0x100>;
interrupt-parent = <&gic>; interrupt-parent = <&gic>;
interrupts = <0 166 4>; interrupts = <0 166 4>;
...@@ -170,7 +169,7 @@ sdhi1: sdhi@ee120000 { ...@@ -170,7 +169,7 @@ sdhi1: sdhi@ee120000 {
}; };
sdhi2: sdhi@ee140000 { sdhi2: sdhi@ee140000 {
compatible = "renesas,r8a7790-sdhi"; compatible = "renesas,sdhi-r8a7790";
reg = <0 0xee140000 0 0x100>; reg = <0 0xee140000 0 0x100>;
interrupt-parent = <&gic>; interrupt-parent = <&gic>;
interrupts = <0 167 4>; interrupts = <0 167 4>;
...@@ -179,7 +178,7 @@ sdhi2: sdhi@ee140000 { ...@@ -179,7 +178,7 @@ sdhi2: sdhi@ee140000 {
}; };
sdhi3: sdhi@ee160000 { sdhi3: sdhi@ee160000 {
compatible = "renesas,r8a7790-sdhi"; compatible = "renesas,sdhi-r8a7790";
reg = <0 0xee160000 0 0x100>; reg = <0 0xee160000 0 0x100>;
interrupt-parent = <&gic>; interrupt-parent = <&gic>;
interrupts = <0 168 4>; interrupts = <0 168 4>;
......
...@@ -196,7 +196,7 @@ mmcif: mmcif@e6bd0000 { ...@@ -196,7 +196,7 @@ mmcif: mmcif@e6bd0000 {
}; };
sdhi0: sdhi@ee100000 { sdhi0: sdhi@ee100000 {
compatible = "renesas,r8a7740-sdhi"; compatible = "renesas,sdhi-r8a7740";
reg = <0xee100000 0x100>; reg = <0xee100000 0x100>;
interrupt-parent = <&gic>; interrupt-parent = <&gic>;
interrupts = <0 83 4 interrupts = <0 83 4
...@@ -208,7 +208,7 @@ sdhi0: sdhi@ee100000 { ...@@ -208,7 +208,7 @@ sdhi0: sdhi@ee100000 {
/* SDHI1 and SDHI2 have no CD pins, no need for CD IRQ */ /* SDHI1 and SDHI2 have no CD pins, no need for CD IRQ */
sdhi1: sdhi@ee120000 { sdhi1: sdhi@ee120000 {
compatible = "renesas,r8a7740-sdhi"; compatible = "renesas,sdhi-r8a7740";
reg = <0xee120000 0x100>; reg = <0xee120000 0x100>;
interrupt-parent = <&gic>; interrupt-parent = <&gic>;
interrupts = <0 88 4 interrupts = <0 88 4
...@@ -219,7 +219,7 @@ sdhi1: sdhi@ee120000 { ...@@ -219,7 +219,7 @@ sdhi1: sdhi@ee120000 {
}; };
sdhi2: sdhi@ee140000 { sdhi2: sdhi@ee140000 {
compatible = "renesas,r8a7740-sdhi"; compatible = "renesas,sdhi-r8a7740";
reg = <0xee140000 0x100>; reg = <0xee140000 0x100>;
interrupt-parent = <&gic>; interrupt-parent = <&gic>;
interrupts = <0 104 4 interrupts = <0 104 4
......
...@@ -86,7 +86,7 @@ static struct gpio_keys_button gpio_buttons[] = { ...@@ -86,7 +86,7 @@ static struct gpio_keys_button gpio_buttons[] = {
GPIO_KEY(KEY_VOLUMEDOWN, 329, "S21"), GPIO_KEY(KEY_VOLUMEDOWN, 329, "S21"),
}; };
static struct __initdata gpio_keys_platform_data ape6evm_keys_pdata = { static struct gpio_keys_platform_data ape6evm_keys_pdata __initdata = {
.buttons = gpio_buttons, .buttons = gpio_buttons,
.nbuttons = ARRAY_SIZE(gpio_buttons), .nbuttons = ARRAY_SIZE(gpio_buttons),
}; };
......
...@@ -1108,9 +1108,9 @@ static const struct pinctrl_map eva_pinctrl_map[] = { ...@@ -1108,9 +1108,9 @@ static const struct pinctrl_map eva_pinctrl_map[] = {
PIN_MAP_MUX_GROUP_DEFAULT("asoc-simple-card.1", "pfc-r8a7740", PIN_MAP_MUX_GROUP_DEFAULT("asoc-simple-card.1", "pfc-r8a7740",
"fsib_mclk_in", "fsib"), "fsib_mclk_in", "fsib"),
/* GETHER */ /* GETHER */
PIN_MAP_MUX_GROUP_DEFAULT("sh-eth", "pfc-r8a7740", PIN_MAP_MUX_GROUP_DEFAULT("r8a7740-gether", "pfc-r8a7740",
"gether_mii", "gether"), "gether_mii", "gether"),
PIN_MAP_MUX_GROUP_DEFAULT("sh-eth", "pfc-r8a7740", PIN_MAP_MUX_GROUP_DEFAULT("r8a7740-gether", "pfc-r8a7740",
"gether_int", "gether"), "gether_int", "gether"),
/* HDMI */ /* HDMI */
PIN_MAP_MUX_GROUP_DEFAULT("sh-mobile-hdmi", "pfc-r8a7740", PIN_MAP_MUX_GROUP_DEFAULT("sh-mobile-hdmi", "pfc-r8a7740",
......
...@@ -29,6 +29,7 @@ ...@@ -29,6 +29,7 @@
#include <linux/pinctrl/machine.h> #include <linux/pinctrl/machine.h>
#include <linux/platform_data/gpio-rcar.h> #include <linux/platform_data/gpio-rcar.h>
#include <linux/platform_device.h> #include <linux/platform_device.h>
#include <linux/phy.h>
#include <linux/regulator/fixed.h> #include <linux/regulator/fixed.h>
#include <linux/regulator/machine.h> #include <linux/regulator/machine.h>
#include <linux/sh_eth.h> #include <linux/sh_eth.h>
...@@ -155,6 +156,30 @@ static void __init lager_add_standard_devices(void) ...@@ -155,6 +156,30 @@ static void __init lager_add_standard_devices(void)
&ether_pdata, sizeof(ether_pdata)); &ether_pdata, sizeof(ether_pdata));
} }
/*
* Ether LEDs on the Lager board are named LINK and ACTIVE which corresponds
* to non-default 01 setting of the Micrel KSZ8041 PHY control register 1 bits
* 14-15. We have to set them back to 01 from the default 00 value each time
* the PHY is reset. It's also important because the PHY's LED0 signal is
* connected to SoC's ETH_LINK signal and in the PHY's default mode it will
* bounce on and off after each packet, which we apparently want to avoid.
*/
static int lager_ksz8041_fixup(struct phy_device *phydev)
{
u16 phyctrl1 = phy_read(phydev, 0x1e);
phyctrl1 &= ~0xc000;
phyctrl1 |= 0x4000;
return phy_write(phydev, 0x1e, phyctrl1);
}
static void __init lager_init(void)
{
lager_add_standard_devices();
phy_register_fixup_for_id("r8a7790-ether-ff:01", lager_ksz8041_fixup);
}
static const char *lager_boards_compat_dt[] __initdata = { static const char *lager_boards_compat_dt[] __initdata = {
"renesas,lager", "renesas,lager",
NULL, NULL,
...@@ -163,6 +188,6 @@ static const char *lager_boards_compat_dt[] __initdata = { ...@@ -163,6 +188,6 @@ static const char *lager_boards_compat_dt[] __initdata = {
DT_MACHINE_START(LAGER_DT, "lager") DT_MACHINE_START(LAGER_DT, "lager")
.init_early = r8a7790_init_delay, .init_early = r8a7790_init_delay,
.init_time = r8a7790_timer_init, .init_time = r8a7790_timer_init,
.init_machine = lager_add_standard_devices, .init_machine = lager_init,
.dt_compat = lager_boards_compat_dt, .dt_compat = lager_boards_compat_dt,
MACHINE_END MACHINE_END
...@@ -293,10 +293,9 @@ static void gpio_rcar_parse_pdata(struct gpio_rcar_priv *p) ...@@ -293,10 +293,9 @@ static void gpio_rcar_parse_pdata(struct gpio_rcar_priv *p)
if (pdata) { if (pdata) {
p->config = *pdata; p->config = *pdata;
} else if (IS_ENABLED(CONFIG_OF) && np) { } else if (IS_ENABLED(CONFIG_OF) && np) {
ret = of_parse_phandle_with_args(np, "gpio-ranges", ret = of_parse_phandle_with_fixed_args(np, "gpio-ranges", 3, 0,
"#gpio-range-cells", 0, &args); &args);
p->config.number_of_pins = ret == 0 && args.args_count == 3 p->config.number_of_pins = ret == 0 ? args.args[2]
? args.args[2]
: RCAR_MAX_GPIO_PER_BANK; : RCAR_MAX_GPIO_PER_BANK;
p->config.gpio_base = -1; p->config.gpio_base = -1;
} }
......
...@@ -113,14 +113,14 @@ static const struct sh_mobile_sdhi_ops sdhi_ops = { ...@@ -113,14 +113,14 @@ static const struct sh_mobile_sdhi_ops sdhi_ops = {
}; };
static const struct of_device_id sh_mobile_sdhi_of_match[] = { static const struct of_device_id sh_mobile_sdhi_of_match[] = {
{ .compatible = "renesas,shmobile-sdhi" }, { .compatible = "renesas,sdhi-shmobile" },
{ .compatible = "renesas,sh7372-sdhi" }, { .compatible = "renesas,sdhi-sh7372" },
{ .compatible = "renesas,sh73a0-sdhi", .data = &sh_mobile_sdhi_of_cfg[0], }, { .compatible = "renesas,sdhi-sh73a0", .data = &sh_mobile_sdhi_of_cfg[0], },
{ .compatible = "renesas,r8a73a4-sdhi", .data = &sh_mobile_sdhi_of_cfg[0], }, { .compatible = "renesas,sdhi-r8a73a4", .data = &sh_mobile_sdhi_of_cfg[0], },
{ .compatible = "renesas,r8a7740-sdhi", .data = &sh_mobile_sdhi_of_cfg[0], }, { .compatible = "renesas,sdhi-r8a7740", .data = &sh_mobile_sdhi_of_cfg[0], },
{ .compatible = "renesas,r8a7778-sdhi", .data = &sh_mobile_sdhi_of_cfg[0], }, { .compatible = "renesas,sdhi-r8a7778", .data = &sh_mobile_sdhi_of_cfg[0], },
{ .compatible = "renesas,r8a7779-sdhi", .data = &sh_mobile_sdhi_of_cfg[0], }, { .compatible = "renesas,sdhi-r8a7779", .data = &sh_mobile_sdhi_of_cfg[0], },
{ .compatible = "renesas,r8a7790-sdhi", .data = &sh_mobile_sdhi_of_cfg[0], }, { .compatible = "renesas,sdhi-r8a7790", .data = &sh_mobile_sdhi_of_cfg[0], },
{}, {},
}; };
MODULE_DEVICE_TABLE(of, sh_mobile_sdhi_of_match); MODULE_DEVICE_TABLE(of, sh_mobile_sdhi_of_match);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment