diff options
author | Olof Johansson <olof@lixom.net> | 2017-04-19 10:01:18 -0400 |
---|---|---|
committer | Olof Johansson <olof@lixom.net> | 2017-04-19 10:01:18 -0400 |
commit | ab57c2b4948eb02108b26b9c3410a811bae5e352 (patch) | |
tree | eb0aeeb5c5d218a71c4e6d0a32b5893d2b029e83 | |
parent | e7d2b85722f3fab353ceffd2974a875a7a777e7d (diff) | |
parent | ff8abc2839bfab9185978f3c27b5e3b744262efd (diff) |
Merge tag 'imx-soc-4.12' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into next/soc
i.MX SoC changes for 4.12:
- A correction on mmdc_pmu_write_accesses event definition.
- Add new axi_id perf command to support MMDC filter memory usage
profiling.
- Set correct SPI chip_select in platform device registration, so that
spi-imx driver code can be improved to use chip_select directly for
harwdare setup instead of indirectly via the cs_gpio mapping array.
- Disable APIS bus supervisor protect for i.MX25, since the default
configuration doesn't work for a few peripherals accessed through
SDMA.
- Add compatible check for the secondary generation of I2SE i.MX28
Duckbill board support.
* tag 'imx-soc-4.12' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux:
ARM: mxs: add support for I2SE Duckbill 2 boards
ARM: i.MX25: globally disable supervisor protect
ARM: imx: set correct chip_select in platform setup
ARM: imx: Add AXI address filter support for MMDC profiling
ARM: imx: Fix mmdc_pmu_write_accesses event definition
Signed-off-by: Olof Johansson <olof@lixom.net>
-rw-r--r-- | arch/arm/mach-imx/mach-imx25.c | 6 | ||||
-rw-r--r-- | arch/arm/mach-imx/mach-mx31_3ds.c | 7 | ||||
-rw-r--r-- | arch/arm/mach-imx/mach-mx31moboard.c | 4 | ||||
-rw-r--r-- | arch/arm/mach-imx/mach-pcm037_eet.c | 4 | ||||
-rw-r--r-- | arch/arm/mach-imx/mmdc.c | 20 | ||||
-rw-r--r-- | arch/arm/mach-mxs/mach-mxs.c | 3 |
6 files changed, 36 insertions, 8 deletions
diff --git a/arch/arm/mach-imx/mach-imx25.c b/arch/arm/mach-imx/mach-imx25.c index 32dcb5e99e23..353b86e3808f 100644 --- a/arch/arm/mach-imx/mach-imx25.c +++ b/arch/arm/mach-imx/mach-imx25.c | |||
@@ -23,6 +23,11 @@ static void __init imx25_init_early(void) | |||
23 | mxc_set_cpu_type(MXC_CPU_MX25); | 23 | mxc_set_cpu_type(MXC_CPU_MX25); |
24 | } | 24 | } |
25 | 25 | ||
26 | static void __init imx25_dt_init(void) | ||
27 | { | ||
28 | imx_aips_allow_unprivileged_access("fsl,imx25-aips"); | ||
29 | } | ||
30 | |||
26 | static void __init mx25_init_irq(void) | 31 | static void __init mx25_init_irq(void) |
27 | { | 32 | { |
28 | struct device_node *np; | 33 | struct device_node *np; |
@@ -41,6 +46,7 @@ static const char * const imx25_dt_board_compat[] __initconst = { | |||
41 | 46 | ||
42 | DT_MACHINE_START(IMX25_DT, "Freescale i.MX25 (Device Tree Support)") | 47 | DT_MACHINE_START(IMX25_DT, "Freescale i.MX25 (Device Tree Support)") |
43 | .init_early = imx25_init_early, | 48 | .init_early = imx25_init_early, |
49 | .init_machine = imx25_dt_init, | ||
44 | .init_late = imx25_pm_init, | 50 | .init_late = imx25_pm_init, |
45 | .init_irq = mx25_init_irq, | 51 | .init_irq = mx25_init_irq, |
46 | .dt_compat = imx25_dt_board_compat, | 52 | .dt_compat = imx25_dt_board_compat, |
diff --git a/arch/arm/mach-imx/mach-mx31_3ds.c b/arch/arm/mach-imx/mach-mx31_3ds.c index 558e5f8589cb..68c3f0799d5b 100644 --- a/arch/arm/mach-imx/mach-mx31_3ds.c +++ b/arch/arm/mach-imx/mach-mx31_3ds.c | |||
@@ -375,6 +375,8 @@ static struct imx_ssi_platform_data mx31_3ds_ssi_pdata = { | |||
375 | 375 | ||
376 | /* SPI */ | 376 | /* SPI */ |
377 | static int spi0_internal_chipselect[] = { | 377 | static int spi0_internal_chipselect[] = { |
378 | MXC_SPI_CS(0), | ||
379 | MXC_SPI_CS(1), | ||
378 | MXC_SPI_CS(2), | 380 | MXC_SPI_CS(2), |
379 | }; | 381 | }; |
380 | 382 | ||
@@ -385,6 +387,7 @@ static const struct spi_imx_master spi0_pdata __initconst = { | |||
385 | 387 | ||
386 | static int spi1_internal_chipselect[] = { | 388 | static int spi1_internal_chipselect[] = { |
387 | MXC_SPI_CS(0), | 389 | MXC_SPI_CS(0), |
390 | MXC_SPI_CS(1), | ||
388 | MXC_SPI_CS(2), | 391 | MXC_SPI_CS(2), |
389 | }; | 392 | }; |
390 | 393 | ||
@@ -398,7 +401,7 @@ static struct spi_board_info mx31_3ds_spi_devs[] __initdata = { | |||
398 | .modalias = "mc13783", | 401 | .modalias = "mc13783", |
399 | .max_speed_hz = 1000000, | 402 | .max_speed_hz = 1000000, |
400 | .bus_num = 1, | 403 | .bus_num = 1, |
401 | .chip_select = 1, /* SS2 */ | 404 | .chip_select = 2, /* SS2 */ |
402 | .platform_data = &mc13783_pdata, | 405 | .platform_data = &mc13783_pdata, |
403 | /* irq number is run-time assigned */ | 406 | /* irq number is run-time assigned */ |
404 | .mode = SPI_CS_HIGH, | 407 | .mode = SPI_CS_HIGH, |
@@ -406,7 +409,7 @@ static struct spi_board_info mx31_3ds_spi_devs[] __initdata = { | |||
406 | .modalias = "l4f00242t03", | 409 | .modalias = "l4f00242t03", |
407 | .max_speed_hz = 5000000, | 410 | .max_speed_hz = 5000000, |
408 | .bus_num = 0, | 411 | .bus_num = 0, |
409 | .chip_select = 0, /* SS2 */ | 412 | .chip_select = 2, /* SS2 */ |
410 | .platform_data = &mx31_3ds_l4f00242t03_pdata, | 413 | .platform_data = &mx31_3ds_l4f00242t03_pdata, |
411 | }, | 414 | }, |
412 | }; | 415 | }; |
diff --git a/arch/arm/mach-imx/mach-mx31moboard.c b/arch/arm/mach-imx/mach-mx31moboard.c index cc867682520e..bde9a9af6714 100644 --- a/arch/arm/mach-imx/mach-mx31moboard.c +++ b/arch/arm/mach-imx/mach-mx31moboard.c | |||
@@ -296,14 +296,14 @@ static struct spi_board_info moboard_spi_board_info[] __initdata = { | |||
296 | /* irq number is run-time assigned */ | 296 | /* irq number is run-time assigned */ |
297 | .max_speed_hz = 300000, | 297 | .max_speed_hz = 300000, |
298 | .bus_num = 1, | 298 | .bus_num = 1, |
299 | .chip_select = 0, | 299 | .chip_select = 1, |
300 | .platform_data = &moboard_pmic, | 300 | .platform_data = &moboard_pmic, |
301 | .mode = SPI_CS_HIGH, | 301 | .mode = SPI_CS_HIGH, |
302 | }, | 302 | }, |
303 | }; | 303 | }; |
304 | 304 | ||
305 | static int moboard_spi2_cs[] = { | 305 | static int moboard_spi2_cs[] = { |
306 | MXC_SPI_CS(1), | 306 | MXC_SPI_CS(0), MXC_SPI_CS(1), |
307 | }; | 307 | }; |
308 | 308 | ||
309 | static const struct spi_imx_master moboard_spi2_pdata __initconst = { | 309 | static const struct spi_imx_master moboard_spi2_pdata __initconst = { |
diff --git a/arch/arm/mach-imx/mach-pcm037_eet.c b/arch/arm/mach-imx/mach-pcm037_eet.c index 8fd8255068ee..95bd97710494 100644 --- a/arch/arm/mach-imx/mach-pcm037_eet.c +++ b/arch/arm/mach-imx/mach-pcm037_eet.c | |||
@@ -50,13 +50,13 @@ static struct spi_board_info pcm037_spi_dev[] = { | |||
50 | .modalias = "dac124s085", | 50 | .modalias = "dac124s085", |
51 | .max_speed_hz = 400000, | 51 | .max_speed_hz = 400000, |
52 | .bus_num = 0, | 52 | .bus_num = 0, |
53 | .chip_select = 0, /* Index in pcm037_spi1_cs[] */ | 53 | .chip_select = 1, /* Index in pcm037_spi1_cs[] */ |
54 | .mode = SPI_CPHA, | 54 | .mode = SPI_CPHA, |
55 | }, | 55 | }, |
56 | }; | 56 | }; |
57 | 57 | ||
58 | /* Platform Data for MXC CSPI */ | 58 | /* Platform Data for MXC CSPI */ |
59 | static int pcm037_spi1_cs[] = {MXC_SPI_CS(1), IOMUX_TO_GPIO(MX31_PIN_KEY_COL7)}; | 59 | static int pcm037_spi1_cs[] = { MXC_SPI_CS(0), MXC_SPI_CS(1), }; |
60 | 60 | ||
61 | static const struct spi_imx_master pcm037_spi1_pdata __initconst = { | 61 | static const struct spi_imx_master pcm037_spi1_pdata __initconst = { |
62 | .chipselect = pcm037_spi1_cs, | 62 | .chipselect = pcm037_spi1_cs, |
diff --git a/arch/arm/mach-imx/mmdc.c b/arch/arm/mach-imx/mmdc.c index c03bf28d8bbc..78262899a590 100644 --- a/arch/arm/mach-imx/mmdc.c +++ b/arch/arm/mach-imx/mmdc.c | |||
@@ -1,4 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright 2017 NXP | ||
2 | * Copyright 2011,2016 Freescale Semiconductor, Inc. | 3 | * Copyright 2011,2016 Freescale Semiconductor, Inc. |
3 | * Copyright 2011 Linaro Ltd. | 4 | * Copyright 2011 Linaro Ltd. |
4 | * | 5 | * |
@@ -47,6 +48,7 @@ | |||
47 | #define PROFILE_SEL 0x10 | 48 | #define PROFILE_SEL 0x10 |
48 | 49 | ||
49 | #define MMDC_MADPCR0 0x410 | 50 | #define MMDC_MADPCR0 0x410 |
51 | #define MMDC_MADPCR1 0x414 | ||
50 | #define MMDC_MADPSR0 0x418 | 52 | #define MMDC_MADPSR0 0x418 |
51 | #define MMDC_MADPSR1 0x41C | 53 | #define MMDC_MADPSR1 0x41C |
52 | #define MMDC_MADPSR2 0x420 | 54 | #define MMDC_MADPSR2 0x420 |
@@ -57,6 +59,7 @@ | |||
57 | #define MMDC_NUM_COUNTERS 6 | 59 | #define MMDC_NUM_COUNTERS 6 |
58 | 60 | ||
59 | #define MMDC_FLAG_PROFILE_SEL 0x1 | 61 | #define MMDC_FLAG_PROFILE_SEL 0x1 |
62 | #define MMDC_PRF_AXI_ID_CLEAR 0x0 | ||
60 | 63 | ||
61 | #define to_mmdc_pmu(p) container_of(p, struct mmdc_pmu, pmu) | 64 | #define to_mmdc_pmu(p) container_of(p, struct mmdc_pmu, pmu) |
62 | 65 | ||
@@ -87,7 +90,7 @@ static DEFINE_IDA(mmdc_ida); | |||
87 | PMU_EVENT_ATTR_STRING(total-cycles, mmdc_pmu_total_cycles, "event=0x00") | 90 | PMU_EVENT_ATTR_STRING(total-cycles, mmdc_pmu_total_cycles, "event=0x00") |
88 | PMU_EVENT_ATTR_STRING(busy-cycles, mmdc_pmu_busy_cycles, "event=0x01") | 91 | PMU_EVENT_ATTR_STRING(busy-cycles, mmdc_pmu_busy_cycles, "event=0x01") |
89 | PMU_EVENT_ATTR_STRING(read-accesses, mmdc_pmu_read_accesses, "event=0x02") | 92 | PMU_EVENT_ATTR_STRING(read-accesses, mmdc_pmu_read_accesses, "event=0x02") |
90 | PMU_EVENT_ATTR_STRING(write-accesses, mmdc_pmu_write_accesses, "config=0x03") | 93 | PMU_EVENT_ATTR_STRING(write-accesses, mmdc_pmu_write_accesses, "event=0x03") |
91 | PMU_EVENT_ATTR_STRING(read-bytes, mmdc_pmu_read_bytes, "event=0x04") | 94 | PMU_EVENT_ATTR_STRING(read-bytes, mmdc_pmu_read_bytes, "event=0x04") |
92 | PMU_EVENT_ATTR_STRING(read-bytes.unit, mmdc_pmu_read_bytes_unit, "MB"); | 95 | PMU_EVENT_ATTR_STRING(read-bytes.unit, mmdc_pmu_read_bytes_unit, "MB"); |
93 | PMU_EVENT_ATTR_STRING(read-bytes.scale, mmdc_pmu_read_bytes_scale, "0.000001"); | 96 | PMU_EVENT_ATTR_STRING(read-bytes.scale, mmdc_pmu_read_bytes_scale, "0.000001"); |
@@ -161,8 +164,11 @@ static struct attribute_group mmdc_pmu_events_attr_group = { | |||
161 | }; | 164 | }; |
162 | 165 | ||
163 | PMU_FORMAT_ATTR(event, "config:0-63"); | 166 | PMU_FORMAT_ATTR(event, "config:0-63"); |
167 | PMU_FORMAT_ATTR(axi_id, "config1:0-63"); | ||
168 | |||
164 | static struct attribute *mmdc_pmu_format_attrs[] = { | 169 | static struct attribute *mmdc_pmu_format_attrs[] = { |
165 | &format_attr_event.attr, | 170 | &format_attr_event.attr, |
171 | &format_attr_axi_id.attr, | ||
166 | NULL, | 172 | NULL, |
167 | }; | 173 | }; |
168 | 174 | ||
@@ -345,6 +351,14 @@ static void mmdc_pmu_event_start(struct perf_event *event, int flags) | |||
345 | 351 | ||
346 | writel(DBG_RST, reg); | 352 | writel(DBG_RST, reg); |
347 | 353 | ||
354 | /* | ||
355 | * Write the AXI id parameter to MADPCR1. | ||
356 | */ | ||
357 | val = event->attr.config1; | ||
358 | reg = mmdc_base + MMDC_MADPCR1; | ||
359 | writel(val, reg); | ||
360 | |||
361 | reg = mmdc_base + MMDC_MADPCR0; | ||
348 | val = DBG_EN; | 362 | val = DBG_EN; |
349 | if (pmu_mmdc->devtype_data->flags & MMDC_FLAG_PROFILE_SEL) | 363 | if (pmu_mmdc->devtype_data->flags & MMDC_FLAG_PROFILE_SEL) |
350 | val |= PROFILE_SEL; | 364 | val |= PROFILE_SEL; |
@@ -382,6 +396,10 @@ static void mmdc_pmu_event_stop(struct perf_event *event, int flags) | |||
382 | reg = mmdc_base + MMDC_MADPCR0; | 396 | reg = mmdc_base + MMDC_MADPCR0; |
383 | 397 | ||
384 | writel(PRF_FRZ, reg); | 398 | writel(PRF_FRZ, reg); |
399 | |||
400 | reg = mmdc_base + MMDC_MADPCR1; | ||
401 | writel(MMDC_PRF_AXI_ID_CLEAR, reg); | ||
402 | |||
385 | mmdc_pmu_event_update(event); | 403 | mmdc_pmu_event_update(event); |
386 | } | 404 | } |
387 | 405 | ||
diff --git a/arch/arm/mach-mxs/mach-mxs.c b/arch/arm/mach-mxs/mach-mxs.c index e4f21086b42b..1c6062d240c8 100644 --- a/arch/arm/mach-mxs/mach-mxs.c +++ b/arch/arm/mach-mxs/mach-mxs.c | |||
@@ -419,7 +419,8 @@ static void __init mxs_machine_init(void) | |||
419 | crystalfontz_init(); | 419 | crystalfontz_init(); |
420 | else if (of_machine_is_compatible("eukrea,mbmx283lc")) | 420 | else if (of_machine_is_compatible("eukrea,mbmx283lc")) |
421 | eukrea_mbmx283lc_init(); | 421 | eukrea_mbmx283lc_init(); |
422 | else if (of_machine_is_compatible("i2se,duckbill")) | 422 | else if (of_machine_is_compatible("i2se,duckbill") || |
423 | of_machine_is_compatible("i2se,duckbill-2")) | ||
423 | duckbill_init(); | 424 | duckbill_init(); |
424 | else if (of_machine_is_compatible("msr,m28cu3")) | 425 | else if (of_machine_is_compatible("msr,m28cu3")) |
425 | m28cu3_init(); | 426 | m28cu3_init(); |