diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2014-04-05 18:37:40 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-04-05 18:37:40 -0400 |
commit | cbda94e039c3862326a65d1d0506447af8330c3c (patch) | |
tree | 1147da54ec6eb7e1081977f07e62d514b981d9a3 /drivers/bus | |
parent | f83ccb93585d1f472c30fa2bbb8b56c23dbdb506 (diff) | |
parent | f1d7d8c86bc8ca41c88acf10ce383c5104cf4920 (diff) |
Merge tag 'drivers-3.15' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc
Pull ARM SoC driver changes from Arnd Bergmann:
"These changes are mostly for ARM specific device drivers that either
don't have an upstream maintainer, or that had the maintainer ask us
to pick up the changes to avoid conflicts.
A large chunk of this are clock drivers (bcm281xx, exynos, versatile,
shmobile), aside from that, reset controllers for STi as well as a
large rework of the Marvell Orion/EBU watchdog driver are notable"
* tag 'drivers-3.15' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (99 commits)
Revert "dts: socfpga: Add DTS entry for adding the stmmac glue layer for stmmac."
Revert "net: stmmac: Add SOCFPGA glue driver"
ARM: shmobile: r8a7791: Fix SCIFA3-5 clocks
ARM: STi: Add reset controller support to mach-sti Kconfig
drivers: reset: stih416: add softreset controller
drivers: reset: stih415: add softreset controller
drivers: reset: Reset controller driver for STiH416
drivers: reset: Reset controller driver for STiH415
drivers: reset: STi SoC system configuration reset controller support
dts: socfpga: Add sysmgr node so the gmac can use to reference
dts: socfpga: Add support for SD/MMC on the SOCFPGA platform
reset: Add optional resets and stubs
ARM: shmobile: r7s72100: fix bus clock calculation
Power: Reset: Generalize qnap-poweroff to work on Synology devices.
dts: socfpga: Update clock entry to support multiple parents
ARM: socfpga: Update socfpga_defconfig
dts: socfpga: Add DTS entry for adding the stmmac glue layer for stmmac.
net: stmmac: Add SOCFPGA glue driver
watchdog: orion_wdt: Use %pa to print 'phys_addr_t'
drivers: cci: Export CCI PMU revision
...
Diffstat (limited to 'drivers/bus')
-rw-r--r-- | drivers/bus/arm-cci.c | 24 | ||||
-rw-r--r-- | drivers/bus/mvebu-mbus.c | 3 |
2 files changed, 14 insertions, 13 deletions
diff --git a/drivers/bus/arm-cci.c b/drivers/bus/arm-cci.c index 962fd35cbd8d..5a86da97a70b 100644 --- a/drivers/bus/arm-cci.c +++ b/drivers/bus/arm-cci.c | |||
@@ -31,7 +31,6 @@ | |||
31 | 31 | ||
32 | #define DRIVER_NAME "CCI-400" | 32 | #define DRIVER_NAME "CCI-400" |
33 | #define DRIVER_NAME_PMU DRIVER_NAME " PMU" | 33 | #define DRIVER_NAME_PMU DRIVER_NAME " PMU" |
34 | #define PMU_NAME "CCI_400" | ||
35 | 34 | ||
36 | #define CCI_PORT_CTRL 0x0 | 35 | #define CCI_PORT_CTRL 0x0 |
37 | #define CCI_CTRL_STATUS 0xc | 36 | #define CCI_CTRL_STATUS 0xc |
@@ -88,8 +87,7 @@ static unsigned long cci_ctrl_phys; | |||
88 | 87 | ||
89 | #define CCI_REV_R0 0 | 88 | #define CCI_REV_R0 0 |
90 | #define CCI_REV_R1 1 | 89 | #define CCI_REV_R1 1 |
91 | #define CCI_REV_R0_P4 4 | 90 | #define CCI_REV_R1_PX 5 |
92 | #define CCI_REV_R1_P2 6 | ||
93 | 91 | ||
94 | #define CCI_PMU_EVT_SEL 0x000 | 92 | #define CCI_PMU_EVT_SEL 0x000 |
95 | #define CCI_PMU_CNTR 0x004 | 93 | #define CCI_PMU_CNTR 0x004 |
@@ -163,6 +161,15 @@ static struct pmu_port_event_ranges port_event_range[] = { | |||
163 | }, | 161 | }, |
164 | }; | 162 | }; |
165 | 163 | ||
164 | /* | ||
165 | * Export different PMU names for the different revisions so userspace knows | ||
166 | * because the event ids are different | ||
167 | */ | ||
168 | static char *const pmu_names[] = { | ||
169 | [CCI_REV_R0] = "CCI_400", | ||
170 | [CCI_REV_R1] = "CCI_400_r1", | ||
171 | }; | ||
172 | |||
166 | struct cci_pmu_drv_data { | 173 | struct cci_pmu_drv_data { |
167 | void __iomem *base; | 174 | void __iomem *base; |
168 | struct arm_pmu *cci_pmu; | 175 | struct arm_pmu *cci_pmu; |
@@ -193,21 +200,16 @@ static int probe_cci_revision(void) | |||
193 | rev = readl_relaxed(cci_ctrl_base + CCI_PID2) & CCI_PID2_REV_MASK; | 200 | rev = readl_relaxed(cci_ctrl_base + CCI_PID2) & CCI_PID2_REV_MASK; |
194 | rev >>= CCI_PID2_REV_SHIFT; | 201 | rev >>= CCI_PID2_REV_SHIFT; |
195 | 202 | ||
196 | if (rev <= CCI_REV_R0_P4) | 203 | if (rev < CCI_REV_R1_PX) |
197 | return CCI_REV_R0; | 204 | return CCI_REV_R0; |
198 | else if (rev <= CCI_REV_R1_P2) | 205 | else |
199 | return CCI_REV_R1; | 206 | return CCI_REV_R1; |
200 | |||
201 | return -ENOENT; | ||
202 | } | 207 | } |
203 | 208 | ||
204 | static struct pmu_port_event_ranges *port_range_by_rev(void) | 209 | static struct pmu_port_event_ranges *port_range_by_rev(void) |
205 | { | 210 | { |
206 | int rev = probe_cci_revision(); | 211 | int rev = probe_cci_revision(); |
207 | 212 | ||
208 | if (rev < 0) | ||
209 | return NULL; | ||
210 | |||
211 | return &port_event_range[rev]; | 213 | return &port_event_range[rev]; |
212 | } | 214 | } |
213 | 215 | ||
@@ -526,7 +528,7 @@ static void pmu_write_counter(struct perf_event *event, u32 value) | |||
526 | static int cci_pmu_init(struct arm_pmu *cci_pmu, struct platform_device *pdev) | 528 | static int cci_pmu_init(struct arm_pmu *cci_pmu, struct platform_device *pdev) |
527 | { | 529 | { |
528 | *cci_pmu = (struct arm_pmu){ | 530 | *cci_pmu = (struct arm_pmu){ |
529 | .name = PMU_NAME, | 531 | .name = pmu_names[probe_cci_revision()], |
530 | .max_period = (1LLU << 32) - 1, | 532 | .max_period = (1LLU << 32) - 1, |
531 | .get_hw_events = pmu_get_hw_events, | 533 | .get_hw_events = pmu_get_hw_events, |
532 | .get_event_idx = pmu_get_event_idx, | 534 | .get_event_idx = pmu_get_event_idx, |
diff --git a/drivers/bus/mvebu-mbus.c b/drivers/bus/mvebu-mbus.c index 2ac754e18bcf..293e2e0a0a87 100644 --- a/drivers/bus/mvebu-mbus.c +++ b/drivers/bus/mvebu-mbus.c | |||
@@ -890,13 +890,12 @@ int __init mvebu_mbus_dt_init(void) | |||
890 | const __be32 *prop; | 890 | const __be32 *prop; |
891 | int ret; | 891 | int ret; |
892 | 892 | ||
893 | np = of_find_matching_node(NULL, of_mvebu_mbus_ids); | 893 | np = of_find_matching_node_and_match(NULL, of_mvebu_mbus_ids, &of_id); |
894 | if (!np) { | 894 | if (!np) { |
895 | pr_err("could not find a matching SoC family\n"); | 895 | pr_err("could not find a matching SoC family\n"); |
896 | return -ENODEV; | 896 | return -ENODEV; |
897 | } | 897 | } |
898 | 898 | ||
899 | of_id = of_match_node(of_mvebu_mbus_ids, np); | ||
900 | mbus_state.soc = of_id->data; | 899 | mbus_state.soc = of_id->data; |
901 | 900 | ||
902 | prop = of_get_property(np, "controller", NULL); | 901 | prop = of_get_property(np, "controller", NULL); |