* Re: [PATCH v2 1/3] i2c: pxa: Add support for the I2C units found in Armada 3700
From: Romain Perier @ 2016-11-09 9:55 UTC (permalink / raw)
To: Baruch Siach
Cc: Mark Rutland, Andrew Lunn, Wolfram Sang, Hanna Hawa, Nadav Haklai,
Neta Zur Hershkovits, linux-i2c, Yahuda Yitschak,
linux-arm-kernel, Sebastian Hesselbarth, devicetree, Jason Cooper,
Pawel Moll, Ian Campbell, Omri Itach, Rob Herring,
Gregory Clement, Marcin Wojtas, Igal Liberman, Thomas Petazzoni,
Shadi Ammouri, Kumar Gala
In-Reply-To: <20161109085946.cmd4ltaxpiojq7il@tarshish>
Hi Baruch
Le 09/11/2016 à 09:59, Baruch Siach a écrit :
>> @@ -193,6 +204,8 @@ struct pxa_i2c {
>> unsigned char master_code;
>> unsigned long rate;
>> bool highmode_enter;
>> + unsigned long fm_mask;
>> + unsigned long hs_mask;
>
> Do you really need 64bit for that?
>
> baruch
Mhhh, good point. No I think that I can use an unsigned int.
I will fix it.
Thanks,
Romain
--
Romain Perier, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
^ permalink raw reply
* Re: [v16, 0/7] Fix eSDHC host version register bug
From: Wolfram Sang @ 2016-11-09 9:18 UTC (permalink / raw)
To: Yangbo Lu
Cc: linux-mmc, ulf.hansson, Scott Wood, Arnd Bergmann, linuxppc-dev,
devicetree, linux-arm-kernel, linux-kernel, linux-clk, linux-i2c,
iommu, netdev, Greg Kroah-Hartman, Mark Rutland, Rob Herring,
Russell King, Jochen Friedrich, Joerg Roedel, Claudiu Manoil,
Bhupesh Sharma, Qiang Zhao, Kumar Gala, Leo Li
In-Reply-To: <1478661252-42439-1-git-send-email-yangbo.lu@nxp.com>
[-- Attachment #1: Type: text/plain, Size: 121 bytes --]
Can you please update your CC list? There is nothing i2c related in this
patch series, so you could drop the i2c-list.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply
* Re: [PATCH v4 00/14] ARM: dts: r8a779x: use demuxer for I2C
From: Wolfram Sang @ 2016-11-09 8:59 UTC (permalink / raw)
To: Simon Horman; +Cc: Wolfram Sang, linux-renesas-soc, linux-i2c
In-Reply-To: <20161109084406.GA22213@verge.net.au>
[-- Attachment #1: Type: text/plain, Size: 1470 bytes --]
Hi Simon,
> I have tested these patches on alt, gose, lager and koelsch.
Wow, that was quick. Thank you!
> The switching part seems to work fine, in so far as my test script
> succeeds. However, it seems that some IP blocks are not able to handle
> this switching. In particular I needed to disable VIDEO_RCAR_VIN and
> REGULATOR_DA9210 to avoid errors shown in the logs below.
Yes. Probably we should activate the shiny new DEBUG_TEST_DRIVER_REMOVE
and if that passes, we should be safe.
> My suggestion is to drop the following patches until those problems
> can be sorted out, most likely via driver updates.
>
> ARM: dts: alt: use demuxer for I2C1
> ARM: dts: gose: use demuxer for I2C2
> ARM: dts: lager: use demuxer for IIC2/I2C2
> ARM: dts: lager: use demuxer for IIC3/I2C3
> ARM: dts: koelsch: use demuxer for I2C2
OK. I'll try to have a look at those drivers nonetheless, because
rebasing these patches is a bit of a hazzle once new i2c slaves were
added to the busses. But I'll juest resend the patches along with my
fixes if I really can find the time.
> I am not in a position to test silk or porter at this time.
> But by the same reasoning above I wonder if the following should
> be dropped for now.
>
> ARM: dts: gose: use demuxer for I2C2
I assume you mean 'porter' here.
> ARM: dts: silk: use demuxer for I2C1
Will you get access to these boards in the foreseeable future?
Thanks,
Wolfram
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply
* Re: [PATCH v2 1/3] i2c: pxa: Add support for the I2C units found in Armada 3700
From: Baruch Siach @ 2016-11-09 8:59 UTC (permalink / raw)
To: Romain Perier
Cc: Wolfram Sang, linux-i2c-u79uwXL29TY76Z2rM5mHXA, Mark Rutland,
devicetree-u79uwXL29TY76Z2rM5mHXA, Yahuda Yitschak, Jason Cooper,
Pawel Moll, Ian Campbell, Igal Liberman, Hanna Hawa, Omri Itach,
Nadav Haklai, Rob Herring, Andrew Lunn, Neta Zur Hershkovits,
Kumar Gala, Gregory Clement, Shadi Ammouri, Marcin Wojtas,
Thomas Petazzoni, linux-arm-kernel-IAPFreCvJWMP3drIcvDWNA
In-Reply-To: <20161109081431.10115-2-romain.perier-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
Hi Romain,
On Wed, Nov 09, 2016 at 09:14:29AM +0100, Romain Perier wrote:
> The Armada 3700 has two I2C controllers that is compliant with the I2C
> Bus Specificiation 2.1, supports multi-master and different bus speed:
> Standard mode (up to 100 KHz), Fast mode (up to 400 KHz),
> High speed mode (up to 3.4 Mhz).
>
> This IP block has a lot of similarity with the PXA, except some register
> offsets and bitfield. This commits adds a basic support for this I2C
> unit.
>
> Signed-off-by: Romain Perier <romain.perier-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
> Tested-by: Gregory CLEMENT <gregory.clement-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
[...]
> @@ -122,7 +131,9 @@ MODULE_DEVICE_TABLE(platform, i2c_pxa_id_table);
> #define ICR_SADIE (1 << 13) /* slave address detected int enable */
> #define ICR_UR (1 << 14) /* unit reset */
> #define ICR_FM (1 << 15) /* fast mode */
> +#define ICR_BUSMODE_FM (1 << 16) /* shifted fast mode for armada-3700 */
> #define ICR_HS (1 << 16) /* High Speed mode */
> +#define ICR_BUSMODE_HS (1 << 17) /* shifted high speed mode for armada-3700 */
> #define ICR_GPIOEN (1 << 19) /* enable GPIO mode for SCL in HS */
>
> #define ISR_RWM (1 << 0) /* read/write mode */
> @@ -193,6 +204,8 @@ struct pxa_i2c {
> unsigned char master_code;
> unsigned long rate;
> bool highmode_enter;
> + unsigned long fm_mask;
> + unsigned long hs_mask;
Do you really need 64bit for that?
baruch
> };
>
> #define _IBMR(i2c) ((i2c)->reg_ibmr)
> @@ -503,8 +516,8 @@ static void i2c_pxa_reset(struct pxa_i2c *i2c)
> writel(i2c->slave_addr, _ISAR(i2c));
>
> /* set control register values */
> - writel(I2C_ICR_INIT | (i2c->fast_mode ? ICR_FM : 0), _ICR(i2c));
> - writel(readl(_ICR(i2c)) | (i2c->high_mode ? ICR_HS : 0), _ICR(i2c));
> + writel(I2C_ICR_INIT | (i2c->fast_mode ? i2c->fm_mask : 0), _ICR(i2c));
> + writel(readl(_ICR(i2c)) | (i2c->high_mode ? i2c->hs_mask : 0), _ICR(i2c));
>
> #ifdef CONFIG_I2C_PXA_SLAVE
> dev_info(&i2c->adap.dev, "Enabling slave mode\n");
> @@ -1137,6 +1150,7 @@ static const struct of_device_id i2c_pxa_dt_ids[] = {
> { .compatible = "mrvl,pxa-i2c", .data = (void *)REGS_PXA2XX },
> { .compatible = "mrvl,pwri2c", .data = (void *)REGS_PXA3XX },
> { .compatible = "mrvl,mmp-twsi", .data = (void *)REGS_PXA910 },
> + { .compatible = "marvell,armada-3700-i2c", .data = (void *)REGS_A3700 },
> {}
> };
> MODULE_DEVICE_TABLE(of, i2c_pxa_dt_ids);
> @@ -1158,6 +1172,13 @@ static int i2c_pxa_probe_dt(struct platform_device *pdev, struct pxa_i2c *i2c,
> i2c->use_pio = 1;
> if (of_get_property(np, "mrvl,i2c-fast-mode", NULL))
> i2c->fast_mode = 1;
> + if (of_device_is_compatible(np, "marvell,armada-3700-i2c")) {
> + i2c->fm_mask = ICR_BUSMODE_FM;
> + i2c->hs_mask = ICR_BUSMODE_HS;
> + } else {
> + i2c->fm_mask = ICR_FM;
> + i2c->hs_mask = ICR_HS;
> + }
>
> *i2c_types = (enum pxa_i2c_types)(of_id->data);
--
http://baruch.siach.name/blog/ ~. .~ Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
- baruch-NswTu9S1W3P6gbPvEgmw2w@public.gmane.org - tel: +972.52.368.4656, http://www.tkos.co.il -
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply
* Re: [PATCH v4 00/14] ARM: dts: r8a779x: use demuxer for I2C
From: Geert Uytterhoeven @ 2016-11-09 8:55 UTC (permalink / raw)
To: Simon Horman; +Cc: Wolfram Sang, Linux-Renesas, Linux I2C
In-Reply-To: <20161109084406.GA22213@verge.net.au>
Hi Simon,
On Wed, Nov 9, 2016 at 9:44 AM, Simon Horman <horms@verge.net.au> wrote:
> I am not in a position to test silk or porter at this time.
FWIW, Magnus has a Porter in his farm.
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
^ permalink raw reply
* Re: [PATCH v4 00/14] ARM: dts: r8a779x: use demuxer for I2C
From: Simon Horman @ 2016-11-09 8:44 UTC (permalink / raw)
To: Wolfram Sang; +Cc: linux-renesas-soc, linux-i2c
In-Reply-To: <20161106202032.5227-1-wsa+renesas@sang-engineering.com>
Hi Wolfram,
On Sun, Nov 06, 2016 at 09:20:18PM +0100, Wolfram Sang wrote:
> So, here is the newest series for using the I2C demuxer on Gen2 boards.
> Initially done by Simon. The intention of this series is to extend use of the
> demuxer for I2C on the lager, koelsch, porter, koelsch, alt and silk boards to
> cover all I2C IP blocks that are either already used or exposed via an EXIO
> connector.
>
> I tested this on a Lager board where I could successfully switch between I2C,
> IIC, and GPIO on I2C2.
>
> Simon, can you test with your script on the other boards? If all works, I'll
> pick up the i2c patch for 4.9, so the DTS changes should be fine for 4.10.
>
> The branch is here:
>
> git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux.git renesas/ip-switch-rework
I have tested these patches on alt, gose, lager and koelsch.
The switching part seems to work fine, in so far as my test script
succeeds. However, it seems that some IP blocks are not able to handle
this switching. In particular I needed to disable VIDEO_RCAR_VIN and
REGULATOR_DA9210 to avoid errors shown in the logs below.
My suggestion is to drop the following patches until those problems
can be sorted out, most likely via driver updates.
ARM: dts: alt: use demuxer for I2C1
ARM: dts: gose: use demuxer for I2C2
ARM: dts: lager: use demuxer for IIC2/I2C2
ARM: dts: lager: use demuxer for IIC3/I2C3
ARM: dts: koelsch: use demuxer for I2C2
I am not in a position to test silk or porter at this time.
But by the same reasoning above I wonder if the following should
be dropped for now.
ARM: dts: gose: use demuxer for I2C2
ARM: dts: silk: use demuxer for I2C1
Some boot logs follow:
board: koelsch
config: shmobile_defconfig; VIDEO_RCAR_VIN not set
# ./exercise-i2c-demux.sh
./exercise-i2c-demux.sh
I2C Demux: i2c-12. Master: 1:/i2c-9 (1)
[ 60.782245] i2c-gpio i2c-9: using pins 796 (SDA) and 795 (SCL)
I2C Demux: i2c-12. Master: 0:/i2c@e6518000 (0)
[ 66.812087] i2c-rcar e6518000.i2c: probed
I2C Demux: i2c-13. Master: 1:/i2c-10 (1)
[ 72.853085] i2c-gpio i2c-10: using pins 941 (SDA) and 940 (SCL)
[ 72.860037] adv7180 13-0020: chip found @ 0x20 (i2c-demux (master i2c-10))
[ 72.876990] i2c i2c-10: sendbytes: NAK bailout.
[ 72.913992] at24 13-0050: 256 byte 24c02 EEPROM, writable, 16 bytes/write
I2C Demux: i2c-13. Master: 0:/i2c@e6530000 (0)
[ 78.942593] i2c-rcar e6530000.i2c: probed
[ 78.947595] adv7180 13-0020: chip found @ 0x20 (i2c-demux (master i2c-2))
[ 78.979763] at24 13-0050: 256 byte 24c02 EEPROM, writable, 16 bytes/write
I2C Demux: i2c-14. Master: 1:/i2c-11 (1)
[ 85.022244] i2c-gpio i2c-11: using pins 794 (SDA) and 793 (SCL)
I2C Demux: i2c-14. Master: 0:/i2c@e6520000 (0)
[ 91.052892] i2c-rcar e6520000.i2c: probed
board: koelsch
config: shmobile_defconfig
# ./exercise-i2c-demux.sh
I2C Demux: i2c-12. Master: 1:/i2c-9 (1)
[ 44.742363] i2c-gpio i2c-9: using pins 796 (SDA) and 795 (SCL)
I2C Demux: i2c-12. Master: 0:/i2c@e6518000 (0)
[ 51.591786] i2c-rcar e6518000.i2c: probed
I2C Demux: i2c-13. Master: 1:/i2c-10 (1)
[ 57.630256] rcar-vin e6ef1000.video: Removing video25
[ 57.638391] i2c-gpio i2c-10: using pins 941 (SDA) and 940 (SCL)
[ 57.646081] adv7180 13-0020: chip found @ 0x20 (i2c-demux (master i2c-10))
[ 57.663185] i2c i2c-10: sendbytes: NAK bailout.
[ 57.682324] kobject (ee422118): tried to init an initialized object, something is seriously wrong.
[ 57.691333] CPU: 0 PID: 1823 Comm: exercise-i2c-de Not tainted 4.9.0-rc2-00308-g0c970223ab93 #124
[ 57.700203] Hardware name: Generic R8A7791 (Flattened Device Tree)
[ 57.706380] Backtrace:
[ 57.708849] [<c010a094>] (dump_backtrace) from [<c010a234>] (show_stack+0x18/0x1c)
[ 57.716414] r6:c08360fc[ 57.718770] r5:00000000
r4:60000013[ 57.722352] r3:00404000
[ 57.724882]
[ 57.726378] [<c010a21c>] (show_stack) from [<c02df780>] (dump_stack+0x80/0xa0)
[ 57.733601] [<c02df700>] (dump_stack) from [<c02e1668>] (kobject_init+0x3c/0x98)
[ 57.740992] r5:c0a2c900[ 57.743347] r4:ee422118
[ 57.745876]
[ 57.747375] [<c02e162c>] (kobject_init) from [<c03baab0>] (device_initialize+0x28/0x94)
[ 57.755373] r5:c0a7db24[ 57.757727] r4:ee422110
[ 57.760256]
[ 57.761748] [<c03baa88>] (device_initialize) from [<c03bc4e0>] (device_register+0x14/0x20)
[ 57.770007] r5:00000019[ 57.772361] r4:ee422110
[ 57.774890]
[ 57.776384] [<c03bc4cc>] (device_register) from [<c04a02c4>] (__video_register_device+0xf4c/0x123c)
[ 57.785424] r4:ee422020[ 57.787778] r3:00000019
[ 57.790308]
[ 57.791801] [<c049f378>] (__video_register_device) from [<c04cd124>] (rvin_v4l2_probe+0x204/0x268)
[ 57.800753] r10:c0a3330c[ 57.803194] r9:00000000
r8:c0a34338[ 57.806776] r7:c077d784
r6:ee422388[ 57.810357] r5:ee54b054
[ 57.812887] r4:ee422010[ 57.815241]
[ 57.816734] [<c04ccf20>] (rvin_v4l2_probe) from [<c04cac5c>] (rvin_digital_notify_complete+0xe8/0x11c)
[ 57.826034] r7:00002006[ 57.828388] r6:ee422010
r5:00000000[ 57.831969] r4:ee4223cc
[ 57.834498]
[ 57.835990] [<c04cab74>] (rvin_digital_notify_complete) from [<c04af7d8>] (v4l2_async_test_notify+0xe0/0xec)
[ 57.845811] r7:c04cab74[ 57.848165] r6:ee4223fc
r5:ee54b054[ 57.851746] r4:ee4223cc
[ 57.854275]
[ 57.855766] [<c04af6f8>] (v4l2_async_test_notify) from [<c04afb34>] (v4l2_async_register_subdev+0x6c/0xc4)
[ 57.865413] r7:ee54b100[ 57.867767] r6:ee4223cc
r5:ee54b054[ 57.871349] r4:c0a34320
[ 57.873878]
[ 57.875371] [<c04afac8>] (v4l2_async_register_subdev) from [<c049ba04>] (adv7180_probe+0x31c/0x3cc)
[ 57.884410] r8:00000001[ 57.886764] r7:ee54b054
r6:00000000[ 57.890346] r5:ee549600
r4:ee54b010[ 57.893927] r3:00000000
[ 57.896465] [<c049b6e8>] (adv7180_probe) from [<c0491854>] (i2c_device_probe+0x1a0/0x1f4)
[ 57.904636] r9:ee4ee000[ 57.906991] r8:c049b6e8
r7:ee549600[ 57.910572] r6:ee549604
r5:c077508c[ 57.914153] r4:ee549620
[ 57.916689] [<c04916b4>] (i2c_device_probe) from [<c03be600>] (driver_probe_device+0x134/0x2b0)
[ 57.925382] r8:ef362c60[ 57.927735] r7:00000014
r6:c0a337d4[ 57.931317] r5:00000000
r4:ee549620[ 57.934898] r3:c04916b4
[ 57.937432] [<c03be4cc>] (driver_probe_device) from [<c03bea0c>] (__device_attach_driver+0xa4/0xb0)
[ 57.946471] r7:00000000[ 57.948825] r6:ee4efca8
r5:c0a337d4[ 57.952406] r4:ee549620
[ 57.954936]
[ 57.956428] [<c03be968>] (__device_attach_driver) from [<c03bd0ec>] (bus_for_each_drv+0x58/0x94)
[ 57.965208] r6:c03be968[ 57.967562] r5:ee4efc80
r4:ee4efca8[ 57.971144] r3:ef160d70
[ 57.973673]
[ 57.975165] [<c03bd094>] (bus_for_each_drv) from [<c03be384>] (__device_attach+0x8c/0x104)
[ 57.983423] r7:00000000[ 57.985777] r6:00000001
r5:ee549654[ 57.989358] r4:ee549620
[ 57.991887]
[ 57.993378] [<c03be2f8>] (__device_attach) from [<c03bea44>] (device_initial_probe+0x14/0x18)
[ 58.001897] r7:00000000[ 58.004251] r6:ee549620
r5:c0a33358[ 58.007832] r4:ee549620
[ 58.010362]
[ 58.011853] [<c03bea30>] (device_initial_probe) from [<c03bd2a0>] (bus_probe_device+0x30/0x88)
[ 58.020465] [<c03bd270>] (bus_probe_device) from [<c03bc1dc>] (device_add+0x38c/0x514)
[ 58.028376] r6:00000000[ 58.030730] r5:ee549628
r4:ee549620[ 58.034311] r3:00000000
[ 58.036840]
[ 58.038332] [<c03bbe50>] (device_add) from [<c03bc4e8>] (device_register+0x1c/0x20)
[ 58.045983] r10:ffffffed[ 58.048424] r8:ef7f46d0
r7:ee549604[ 58.052005] r6:ee549620
r5:ef362c20[ 58.055587] r4:ee549620
[ 58.058123] [<c03bc4cc>] (device_register) from [<c0491e84>] (i2c_new_device+0x114/0x184)
[ 58.066295] r4:ee549600[ 58.068649] r3:00000020
[ 58.071178]
[ 58.072670] [<c0491d70>] (i2c_new_device) from [<c04921dc>] (of_i2c_register_device+0x160/0x184)
[ 58.081450] r7:ef7f4a1c[ 58.083803] r6:ef362c60
r5:ef362c20[ 58.087385] r4:ef7f4a1c
[ 58.089914]
[ 58.091407] [<c049207c>] (of_i2c_register_device) from [<c0492454>] (i2c_register_adapter+0x254/0x398)
[ 58.100707] r5:ef362c20[ 58.103061] r4:00000000
[ 58.105591]
[ 58.107083] [<c0492200>] (i2c_register_adapter) from [<c0492608>] (__i2c_add_numbered_adapter+0x70/0x94)
[ 58.116557] r8:ef362e6c[ 58.118911] r7:00000000
r6:00000001[ 58.122493] r5:0000000d
r4:ef362c20[ 58.126074] r3:00000001
[ 58.128610] [<c0492598>] (__i2c_add_numbered_adapter) from [<c0492c58>] (i2c_add_adapter+0x3c/0xc8)
[ 58.137650] r5:ef362810[ 58.140004] r4:ef362c20
[ 58.142533]
[ 58.144025] [<c0492c1c>] (i2c_add_adapter) from [<c0499f84>] (i2c_demux_activate_master+0x104/0x15c)
[ 58.153152] r5:ef362810[ 58.155506] r4:ef362c10
[ 58.158035]
[ 58.159527] [<c0499e80>] (i2c_demux_activate_master) from [<c049a178>] (current_master_store+0xa0/0xb4)
[ 58.168913] r10:ee4eff80[ 58.171355] r8:ef362e50
r7:00000001[ 58.174936] r6:00000000
r5:00000002[ 58.178517] r4:ef362c10
[ 58.181052] [<c049a0d8>] (current_master_store) from [<c03ba1ac>] (dev_attr_store+0x20/0x2c)
[ 58.189484] r8:00000051[ 58.191838] r7:ee453a0c
r6:ef161180[ 58.195419] r5:00000002
r4:ef161180[ 58.198999]
[ 58.200495] [<c03ba18c>] (dev_attr_store) from [<c0240184>] (sysfs_kf_write+0x44/0x50)
[ 58.208411] [<c0240140>] (sysfs_kf_write) from [<c023f7a8>] (kernfs_fop_write+0x150/0x1b4)
[ 58.216669] r4:ee453a00[ 58.219024] r3:c0240140
[ 58.221553]
[ 58.223045] [<c023f658>] (kernfs_fop_write) from [<c01e2124>] (__vfs_write+0x34/0x110)
[ 58.230956] r10:00000000[ 58.233397] r8:00022900
r7:00000002[ 58.236979] r6:ee4eff80
r5:c023f658[ 58.240560] r4:ee57c780
[ 58.243093] [<c01e20f0>] (__vfs_write) from [<c01e238c>] (vfs_write+0xc4/0x150)
[ 58.250397] r8:ee4eff80[ 58.252751] r7:00022900
r6:00000002[ 58.256331] r5:00000000
r4:ee57c780[ 58.259912]
[ 58.261404] [<c01e22c8>] (vfs_write) from [<c01e24e4>] (SyS_write+0x48/0x84)
[ 58.268447] r10:00000000[ 58.270888] r8:c0107104
r7:00022900[ 58.274469] r6:00000002
r5:ee57c780[ 58.278050] r4:ee57c780
[ 58.280586] [<c01e249c>] (SyS_write) from [<c0106f40>] (ret_fast_syscall+0x0/0x3c)
[ 58.288149] r7:00000004[ 58.290504] r6:000217bc
r5:00000002[ 58.294085] r4:00022900
[ 58.296614]
[ 58.299808] rcar-vin e6ef1000.video: Device registered as video25
[ 58.328488] at24 13-0050: 256 byte 24c02 EEPROM, writable, 16 bytes/write
I2C Demux: i2c-13. Master: 0:/i2c@e6530000 (0)
[ 64.370408] rcar-vin e6ef1000.video: Removing video25
[ 64.375646] Unable to handle kernel NULL pointer dereference at virtual address 00000005
[ 64.383761] pgd = ee584000
[ 64.386466] [00000005] *pgd=7fc30835
[ 64.390058] Internal error: Oops: 817 [#1] SMP ARM
[ 64.394851] CPU: 0 PID: 1823 Comm: exercise-i2c-de Not tainted 4.9.0-rc2-00308-g0c970223ab93 #124
[ 64.403718] Hardware name: Generic R8A7791 (Flattened Device Tree)
[ 64.409895] task: ee879000 task.stack: ee4ee000
[ 64.414430] PC is at driver_deferred_probe_del+0x34/0x54
[ 64.419739] LR is at driver_deferred_probe_del+0x18/0x54
[ 64.425048] pc : [<c03be1ac>] lr : [<c03be190>] psr: a0000013
[ 64.425048] sp : ee4efc48 ip : ee4efc48 fp : ee4efc5c
[ 64.436521] r10: ee4eff80 r9 : ee4ee000 r8 : 00000100
[ 64.441742] r7 : 00000000 r6 : ef21ea10 r5 : ee87ad38 r4 : ee422110
[ 64.448264] r3 : ef3d3900 r2 : ef3d3944 r1 : 00000000 r0 : 00000001
[ 64.454789] Flags: NzCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment none
[ 64.461920] Control: 10c5387d Table: 6e58406a DAC: 00000051
[ 64.467662] Process exercise-i2c-de (pid: 1823, stack limit = 0xee4ee210)
[ 64.474446] Stack: (0xee4efc48 to 0xee4f0000)
[ 64.478801] fc40: 00000040 ee422110 ee4efc8c ee4efc60 c03baf54 c03be184
[ 64.486977] fc60: 3a313800 00003636 ee4ee000 ee4eff80 ee422110 ee4223cc ee549600 00000000
[ 64.495152] fc80: ee4efca4 ee4efc90 c03baff0 c03bae00 00000001 ee422020 ee4efcbc ee4efca8
[ 64.503326] fca0: c04a05f8 c03bafe8 c094f360 ee422010 ee4efcd4 ee4efcc0 c04ccf18 c04a05c0
[ 64.511500] fcc0: ee54b054 ee4223cc ee4efcec ee4efcd8 c04cab00 c04cceec c04caad8 ee54b054
[ 64.519675] fce0: ee4efd04 ee4efcf0 c04afc0c c04caae4 ee54b054 ee54b010 ee4efd24 ee4efd08
[ 64.527849] fd00: c049aa14 c04afb98 c049a9f4 ee549620 c0a337d4 c0a33358 ee4efd3c ee4efd28
[ 64.536024] fd20: c0491684 c049aa00 ee549620 c0a337d4 ee4efd54 ee4efd40 c03be8f4 c049163c
[ 64.544198] fd40: ee549654 ee549620 ee4efd6c ee4efd58 c03bea94 c03be864 ee549620 ef160d30
[ 64.552372] fd60: ee4efd8c ee4efd70 c03bd3d8 c03bea7c 0000000a ee549620 ee4efe08 ef362c60
[ 64.560547] fd80: ee4efdbc ee4efd90 c03baf44 c03bd304 ee9a0d14 c03baddc ee4efdc4 ee4efda8
[ 64.568721] fda0: ee549620 ee4efe08 c04928a4 00000000 ee4efdd4 ee4efdc0 c03baff0 c03bae00
[ 64.576896] fdc0: 00000008 ee549600 ee4efdec ee4efdd8 c049265c c03bafe8 00000061 ee549600
[ 64.585070] fde0: ee4efe04 ee4efdf0 c04928e4 c0492638 c0861000 00000000 ee4efe2c ee4efe08
[ 64.593244] fe00: c03bb2ec c04928b0 ef372680 ee9b2594 ef362c20 ef362c60 c0a7f848 ef362c20
[ 64.601419] fe20: ee4efe54 ee4efe30 c0492e18 c03bb2b4 00000002 ef362c10 00000002 00000001
[ 64.609593] fe40: 00000000 00000025 ee4efe84 ee4efe58 c049a13c c0492d18 00000000 00000000
[ 64.617767] fe60: ee4efe5c ee9b0680 00000002 ee9b0680 ee364b0c 00000051 ee4efe94 ee4efe88
[ 64.625942] fe80: c03ba1ac c049a0e4 ee4efeac ee4efe98 c0240184 c03ba198 c0240140 ee364b00
[ 64.634117] fea0: ee4efedc ee4efeb0 c023f7a8 c024014c 00000000 00000000 ee57c300 c023f658
[ 64.642291] fec0: ee4eff80 00000002 00022900 00000000 ee4eff4c ee4efee0 c01e2124 c023f664
[ 64.650465] fee0: 00000000 ef2b3000 ef2b3000 eeb39000 0000000a 0000000b ee4f7000 0000000a
[ 64.658640] ff00: ee4eff3c ee4eff10 c01fe1b8 ee5b29c0 0000000b ee5b29c0 0000000a 00000001
[ 64.666814] ff20: ee4eff3c ee4eff30 ee57c300 ee57c300 00000000 00000002 00022900 ee4eff80
[ 64.674988] ff40: ee4eff7c ee4eff50 c01e238c c01e20fc c01fe64c c01fdc5c ee57c300 ee57c300
[ 64.683163] ff60: 00000002 00022900 c0107104 00000000 ee4effa4 ee4eff80 c01e24e4 c01e22d4
[ 64.691337] ff80: 00000000 00000000 00022900 00000002 000217bc 00000004 00000000 ee4effa8
[ 64.699512] ffa0: c0106f40 c01e24a8 00022900 00000002 00000001 00022900 00000002 00022902
[ 64.707686] ffc0: 00022900 00000002 000217bc 00000004 00000002 00000000 00022700 000219cc
[ 64.715860] ffe0: 00000001 bef14770 00012db1 b6f53b9c 60000010 00000001 37363534 3a3b3938
[ 64.724030] Backtrace:
[ 64.726491] [<c03be178>] (driver_deferred_probe_del) from [<c03baf54>] (device_del+0x160/0x1e8)
[ 64.735183] r4:ee422110[ 64.737538] r3:00000040
[ 64.740068]
[ 64.741560] [<c03badf4>] (device_del) from [<c03baff0>] (device_unregister+0x14/0x20)
[ 64.749385] r7:00000000[ 64.751739] r6:ee549600
r5:ee4223cc[ 64.755321] r4:ee422110
[ 64.757850]
[ 64.759345] [<c03bafdc>] (device_unregister) from [<c04a05f8>] (video_unregister_device+0x44/0x4c)
[ 64.768297] r4:ee422020[ 64.770651] r3:00000001
[ 64.773181]
[ 64.774675] [<c04a05b4>] (video_unregister_device) from [<c04ccf18>] (rvin_v4l2_remove+0x38/0x40)
[ 64.783541] r4:ee422010[ 64.785895] r3:c094f360
[ 64.788425]
[ 64.789916] [<c04ccee0>] (rvin_v4l2_remove) from [<c04cab00>] (rvin_digital_notify_unbind+0x28/0x4c)
[ 64.799042] r4:ee4223cc[ 64.801396] r3:ee54b054
[ 64.803925]
[ 64.805417] [<c04caad8>] (rvin_digital_notify_unbind) from [<c04afc0c>] (v4l2_async_unregister_subdev+0x80/0x90)
[ 64.815585] r4:ee54b054[ 64.817939] r3:c04caad8
[ 64.820468]
[ 64.821961] [<c04afb8c>] (v4l2_async_unregister_subdev) from [<c049aa14>] (adv7180_remove+0x20/0x8c)
[ 64.831087] r5:ee54b010[ 64.833441] r4:ee54b054
[ 64.835970]
[ 64.837463] [<c049a9f4>] (adv7180_remove) from [<c0491684>] (i2c_device_remove+0x54/0x84)
[ 64.845634] r6:c0a33358[ 64.847989] r5:c0a337d4
r4:ee549620[ 64.851569] r3:c049a9f4
[ 64.854098]
[ 64.855590] [<c0491630>] (i2c_device_remove) from [<c03be8f4>] (__device_release_driver+0x9c/0x110)
[ 64.864629] r5:c0a337d4[ 64.866983] r4:ee549620
[ 64.869512]
[ 64.871003] [<c03be858>] (__device_release_driver) from [<c03bea94>] (device_release_driver+0x24/0x30)
[ 64.880303] r5:ee549620[ 64.882657] r4:ee549654
[ 64.885186]
[ 64.886678] [<c03bea70>] (device_release_driver) from [<c03bd3d8>] (bus_remove_device+0xe0/0xf0)
[ 64.895457] r5:ef160d30[ 64.897811] r4:ee549620
[ 64.900340]
[ 64.901833] [<c03bd2f8>] (bus_remove_device) from [<c03baf44>] (device_del+0x150/0x1e8)
[ 64.909830] r6:ef362c60[ 64.912184] r5:ee4efe08
r4:ee549620[ 64.915765] r3:0000000a
[ 64.918294]
[ 64.919786] [<c03badf4>] (device_del) from [<c03baff0>] (device_unregister+0x14/0x20)
[ 64.927610] r7:00000000[ 64.929965] r6:c04928a4
r5:ee4efe08[ 64.933545] r4:ee549620
[ 64.936074]
[ 64.937567] [<c03bafdc>] (device_unregister) from [<c049265c>] (i2c_unregister_device+0x30/0x34)
[ 64.946346] r4:ee549600[ 64.948700] r3:00000008
[ 64.951229]
[ 64.952722] [<c049262c>] (i2c_unregister_device) from [<c04928e4>] (__unregister_client+0x40/0x50)
[ 64.961674] r4:ee549600[ 64.964029] r3:00000061
[ 64.966558]
[ 64.968050] [<c04928a4>] (__unregister_client) from [<c03bb2ec>] (device_for_each_child+0x44/0x80)
[ 64.977003] r4:00000000[ 64.979357] r3:c0861000
[ 64.981886]
[ 64.983378] [<c03bb2a8>] (device_for_each_child) from [<c0492e18>] (i2c_del_adapter+0x10c/0x1ac)
[ 64.992157] r7:ef362c20[ 64.994512] r6:c0a7f848
r5:ef362c60[ 64.998092] r4:ef362c20
[ 65.000621]
[ 65.002113] [<c0492d0c>] (i2c_del_adapter) from [<c049a13c>] (current_master_store+0x64/0xb4)
[ 65.010632] r8:00000025[ 65.012986] r7:00000000
r6:00000001[ 65.016567] r5:00000002
r4:ef362c10[ 65.020148] r3:00000002
[ 65.022683] [<c049a0d8>] (current_master_store) from [<c03ba1ac>] (dev_attr_store+0x20/0x2c)
[ 65.031114] r8:00000051[ 65.033468] r7:ee364b0c
r6:ee9b0680[ 65.037050] r5:00000002
r4:ee9b0680[ 65.040630]
[ 65.042126] [<c03ba18c>] (dev_attr_store) from [<c0240184>] (sysfs_kf_write+0x44/0x50)
[ 65.050041] [<c0240140>] (sysfs_kf_write) from [<c023f7a8>] (kernfs_fop_write+0x150/0x1b4)
[ 65.058298] r4:ee364b00[ 65.060653] r3:c0240140
[ 65.063182]
[ 65.064675] [<c023f658>] (kernfs_fop_write) from [<c01e2124>] (__vfs_write+0x34/0x110)
[ 65.072586] r10:00000000[ 65.075027] r8:00022900
r7:00000002[ 65.078607] r6:ee4eff80
r5:c023f658[ 65.082188] r4:ee57c300
[ 65.084721] [<c01e20f0>] (__vfs_write) from [<c01e238c>] (vfs_write+0xc4/0x150)
[ 65.092025] r8:ee4eff80[ 65.094379] r7:00022900
r6:00000002[ 65.097960] r5:00000000
r4:ee57c300[ 65.101540]
[ 65.103031] [<c01e22c8>] (vfs_write) from [<c01e24e4>] (SyS_write+0x48/0x84)
[ 65.110074] r10:00000000[ 65.112515] r8:c0107104
r7:00022900[ 65.116096] r6:00000002
r5:ee57c300[ 65.119677] r4:ee57c300
[ 65.122214] [<c01e249c>] (SyS_write) from [<c0106f40>] (ret_fast_syscall+0x0/0x3c)
[ 65.129777] r7:00000004[ 65.132132] r6:000217bc
r5:00000002[ 65.135713] r4:00022900
[ 65.138242]
[ 65.139732] Code: e1520001 0a000005 e5931048 e5930044 (e5801004)
[ 65.145837] ---[ end trace d7a178c2931274b3 ]---
Segmentation fault
board: lager
config: shmobile_defconfig; VIDEO_RCAR_VIN not set; REGULATOR_DA9210 not set
# ./exercise-i2c-demux.sh
I2C Demux: i2c-10. Master: 1:/i2c@e6508000 (1)
[ 68.660717] i2c-rcar e6508000.i2c: probed
I2C Demux: i2c-10. Master: 0:/i2c@e6500000 (0)
[ 74.690381] i2c-sh_mobile e6500000.i2c: I2C adapter 4, bus speed 100000 Hz
I2C Demux: i2c-11. Master: 2:/i2c-8 (2)
[ 80.730230] i2c-gpio i2c-8: using pins 979 (SDA) and 978 (SCL)
I2C Demux: i2c-11. Master: 1:/i2c@e6518000 (1)
[ 86.760649] i2c-rcar e6518000.i2c: probed
I2C Demux: i2c-11. Master: 0:/i2c@e6510000 (0)
[ 92.790396] i2c-sh_mobile e6510000.i2c: I2C adapter 5, bus speed 100000 Hz
I2C Demux: i2c-12. Master: 2:/i2c-9 (2)
[ 98.830849] i2c-gpio i2c-9: using pins 842 (SDA) and 841 (SCL)
[ 98.837689] adv7180 12-0020: chip found @ 0x20 (i2c-demux (master i2c-9))
[ 98.853987] i2c i2c-9: sendbytes: NAK bailout.
I2C Demux: i2c-12. Master: 1:/i2c@e6530000 (1)
[ 104.911287] i2c-rcar e6530000.i2c: probed
[ 104.916217] adv7180 12-0020: chip found @ 0x20 (i2c-demux (master i2c-2))
I2C Demux: i2c-12. Master: 0:/i2c@e6520000 (0)
[ 110.971195] i2c-sh_mobile e6520000.i2c: I2C adapter 6, bus speed 100000 Hz
[ 110.979598] adv7180 12-0020: chip found @ 0x20 (i2c-demux (master i2c-6))
I2C Demux: i2c-13. Master: 1:/i2c@e6540000 (1)
[ 117.081495] i2c-rcar e6540000.i2c: probed
[ 117.089796] da9063 13-0058: Device detected (chip-ID: 0x61, var-ID: 0x30)
[ 117.123513] da9063-rtc da9063-rtc: rtc core: registered da9063-rtc as rtc0
I2C Demux: i2c-13. Master: 0:/i2c@e60b0000 (0)
[ 123.201655] i2c-sh_mobile e60b0000.i2c: I2C adapter 7, bus speed 100000 Hz
[ 123.214052] da9063 13-0058: Device detected (chip-ID: 0x61, var-ID: 0x30)
[ 123.249609] da9063-rtc da9063-rtc: rtc core: registered da9063-rtc as rtc0
board: lager
config: shmobile_defconfig; VIDEO_RCAR_VIN not set
# ./exercise-i2c-demux.sh
I2C Demux: i2c-10. Master: 1:/i2c@e6508000 (1)
[ 60.002572] i2c-rcar e6508000.i2c: probed
I2C Demux: i2c-10. Master: 0:/i2c@e6500000 (0)
[ 66.032289] i2c-sh_mobile e6500000.i2c: I2C adapter 4, bus speed 100000 Hz
I2C Demux: i2c-11. Master: 2:/i2c-8 (2)
[ 72.072038] i2c-gpio i2c-8: using pins 979 (SDA) and 978 (SCL)
I2C Demux: i2c-11. Master: 1:/i2c@e6518000 (1)
[ 78.102453] i2c-rcar e6518000.i2c: probed
I2C Demux: i2c-11. Master: 0:/i2c@e6510000 (0)
[ 84.132195] i2c-sh_mobile e6510000.i2c: I2C adapter 5, bus speed 100000 Hz
I2C Demux: i2c-12. Master: 2:/i2c-9 (2)
[ 90.172747] i2c-gpio i2c-9: using pins 842 (SDA) and 841 (SCL)
[ 90.179391] adv7180 12-0020: chip found @ 0x20 (i2c-demux (master i2c-9))
[ 90.195671] i2c i2c-9: sendbytes: NAK bailout.
I2C Demux: i2c-12. Master: 1:/i2c@e6530000 (1)
[ 96.254118] i2c-rcar e6530000.i2c: probed
[ 96.259121] adv7180 12-0020: chip found @ 0x20 (i2c-demux (master i2c-2))
I2C Demux: i2c-12. Master: 0:/i2c@e6520000 (0)
[ 102.312792] i2c-sh_mobile e6520000.i2c: I2C adapter 6, bus speed 100000 Hz
[ 102.320643] adv7180 12-0020: chip found @ 0x20 (i2c-demux (master i2c-6))
I2C Demux: i2c-13. Master: 1:/i2c@e6540000 (1)
[ 108.431603] ------------[ cut here ]------------
[ 108.436239] WARNING: CPU: 0 PID: 1983 at drivers/regulator/core.c:4102 regulator_unregister+0x6c/0xb8
[ 108.445494] CPU: 0 PID: 1983 Comm: exercise-i2c-de Not tainted 4.9.0-rc2-00309-g8ef5284b21f6 #130
[ 108.454364] Hardware name: Generic R8A7790 (Flattened Device Tree)
[ 108.460539] Backtrace:
[ 108.463002] [<c010a094>] (dump_backtrace) from [<c010a234>] (show_stack+0x18/0x1c)
[ 108.470567] r6:c0813174[ 108.472921] r5:00000000
r4:60000013[ 108.476504] r3:00404000
[ 108.479033]
[ 108.480528] [<c010a21c>] (show_stack) from [<c02df780>] (dump_stack+0x80/0xa0)
[ 108.487751] [<c02df700>] (dump_stack) from [<c011e434>] (__warn+0xc4/0xf0)
[ 108.494620] r5:c03538e0[ 108.496974] r4:00000000
[ 108.499503]
[ 108.500994] [<c011e370>] (__warn) from [<c011e518>] (warn_slowpath_null+0x28/0x30)
[ 108.508558] r10:c03c0fe0[ 108.510999] r8:edd31cf0
r7:ef200e40[ 108.514580] r6:00000006
r5:ee819f00[ 108.518161] r4:ee81e800
[ 108.520696] [<c011e4f0>] (warn_slowpath_null) from [<c03538e0>] (regulator_unregister+0x6c/0xb8)
[ 108.529481] [<c0353874>] (regulator_unregister) from [<c0354348>] (devm_rdev_release+0x14/0x18)
[ 108.538173] r4:ee81c620[ 108.540527] r3:c0354334
[ 108.543056]
[ 108.544551] [<c0354334>] (devm_rdev_release) from [<c03c1344>] (release_nodes+0x1a8/0x1d4)
[ 108.552813] [<c03c119c>] (release_nodes) from [<c03c1720>] (devres_release_all+0x4c/0x54)
[ 108.560984] r10:edd31f80[ 108.563425] r9:edd30000
r8:00000100[ 108.567006] r7:00000000
r6:c0a33358[ 108.570587] r5:c0a24f14
[ 108.573117] r4:ee81c620[ 108.575470]
[ 108.576962] [<c03c16d4>] (devres_release_all) from [<c03be8fc>] (__device_release_driver+0xa4/0x110)
[ 108.586088] r4:ee81c620[ 108.588442] r3:00000000
[ 108.590971]
[ 108.592461] [<c03be858>] (__device_release_driver) from [<c03bea94>] (device_release_driver+0x24/0x30)
[ 108.601761] r5:ee81c620[ 108.604115] r4:ee81c654
[ 108.606643]
[ 108.608137] [<c03bea70>] (device_release_driver) from [<c03bd3d8>] (bus_remove_device+0xe0/0xf0)
[ 108.616915] r5:ef1cc430[ 108.619269] r4:ee81c620
[ 108.621799]
[ 108.623291] [<c03bd2f8>] (bus_remove_device) from [<c03baf44>] (device_del+0x150/0x1e8)
[ 108.631289] r6:ef339460[ 108.633643] r5:edd31e08
r4:ee81c620[ 108.637223] r3:00000009
[ 108.639752]
[ 108.641243] [<c03badf4>] (device_del) from [<c03baff0>] (device_unregister+0x14/0x20)
[ 108.649067] r7:00000000[ 108.651421] r6:c04928a4
r5:edd31e08[ 108.655002] r4:ee81c620
[ 108.657531]
[ 108.659026] [<c03bafdc>] (device_unregister) from [<c049265c>] (i2c_unregister_device+0x30/0x34)
[ 108.667805] r4:ee81c600[ 108.670159] r3:00000008
[ 108.672688]
[ 108.674180] [<c049262c>] (i2c_unregister_device) from [<c04928e4>] (__unregister_client+0x40/0x50)
[ 108.683133] r4:ee81c600[ 108.685487] r3:00000061
[ 108.688016]
[ 108.689508] [<c04928a4>] (__unregister_client) from [<c03bb2ec>] (device_for_each_child+0x44/0x80)
[ 108.698460] r4:00000000[ 108.700814] r3:c085f000
[ 108.703343]
[ 108.704835] [<c03bb2a8>] (device_for_each_child) from [<c0492e18>] (i2c_del_adapter+0x10c/0x1ac)
[ 108.713614] r7:ef339420[ 108.715968] r6:c0a7f848
r5:ef339460[ 108.719548] r4:ef339420
[ 108.722077]
[ 108.723570] [<c0492d0c>] (i2c_del_adapter) from [<c049a13c>] (current_master_store+0x64/0xb4)
[ 108.732089] r8:00000024[ 108.734443] r7:00000001
r6:00000000[ 108.738023] r5:00000002
r4:ef339410[ 108.741603] r3:00000002
[ 108.744137] [<c049a0d8>] (current_master_store) from [<c03ba1ac>] (dev_attr_store+0x20/0x2c)
[ 108.752568] r8:00000051[ 108.754923] r7:ee96868c
r6:edf27e80[ 108.758503] r5:00000002
r4:edf27e80[ 108.762083]
[ 108.763578] [<c03ba18c>] (dev_attr_store) from [<c0240184>] (sysfs_kf_write+0x44/0x50)
[ 108.771494] [<c0240140>] (sysfs_kf_write) from [<c023f7a8>] (kernfs_fop_write+0x150/0x1b4)
[ 108.779752] r4:ee968680[ 108.782106] r3:c0240140
[ 108.784635]
[ 108.786127] [<c023f658>] (kernfs_fop_write) from [<c01e2124>] (__vfs_write+0x34/0x110)
[ 108.794037] r10:00000000[ 108.796478] r8:00022908
r7:00000002[ 108.800059] r6:edd31f80
r5:c023f658[ 108.803639] r4:ee74f180
[ 108.806171] [<c01e20f0>] (__vfs_write) from [<c01e238c>] (vfs_write+0xc4/0x150)
[ 108.813474] r8:edd31f80[ 108.815828] r7:00022908
r6:00000002[ 108.819408] r5:00000000
r4:ee74f180[ 108.822988]
[ 108.824479] [<c01e22c8>] (vfs_write) from [<c01e24e4>] (SyS_write+0x48/0x84)
[ 108.831521] r10:00000000[ 108.833962] r8:c0107104
r7:00022908[ 108.837542] r6:00000002
r5:ee74f180[ 108.841123] r4:ee74f180
[ 108.843657] [<c01e249c>] (SyS_write) from [<c0106f40>] (ret_fast_syscall+0x0/0x3c)
[ 108.851220] r7:00000004[ 108.853574] r6:000217bc
r5:00000002[ 108.857155] r4:00022908
[ 108.859684]
[ 108.861210] ---[ end trace 9401af63a0ace05e ]---
[ 108.867822] i2c-rcar e6540000.i2c: probed
[ 108.876079] da9063 13-0058: Device detected (chip-ID: 0x61, var-ID: 0x30)
[ 108.905011] da9063-rtc da9063-rtc: rtc core: registered da9063-rtc as rtc0
I2C Demux: i2c-13. Master: 0:/i2c@e60b0000 (0)
[ 115.013246] i2c-sh_mobile e60b0000.i2c: I2C adapter 7, bus speed 100000 Hz
[ 115.026068] da9063 13-0058: Device detected (chip-ID: 0x61, var-ID: 0x30)
[ 115.062028] da9063-rtc da9063-rtc: rtc core: registered da9063-rtc as rtc0
board: lager
config: shmobile_defconfig
# ./exercise-i2c-demux.sh
I2C Demux: i2c-10. Master: 1:/i2c@e6508000 (1)
[ 48.436144] i2c-rcar e6508000.i2c: probed
I2C Demux: i2c-10. Master: 0:/i2c@e6500000 (0)
[ 54.465184] i2c-sh_mobile e6500000.i2c: I2C adapter 4, bus speed 100000 Hz
I2C Demux: i2c-11. Master: 2:/i2c-8 (2)
[ 60.504997] i2c-gpio i2c-8: using pins 979 (SDA) and 978 (SCL)
I2C Demux: i2c-11. Master: 1:/i2c@e6518000 (1)
[ 66.535450] i2c-rcar e6518000.i2c: probed
I2C Demux: i2c-11. Master: 0:/i2c@e6510000 (0)
[ 72.565219] i2c-sh_mobile e6510000.i2c: I2C adapter 5, bus speed 100000 Hz
I2C Demux: i2c-12. Master: 2:/i2c-9 (2)
[ 78.604003] rcar-vin e6ef1000.video: Removing video34
[ 78.611313] i2c-gpio i2c-9: using pins 842 (SDA) and 841 (SCL)
[ 78.618005] adv7180 12-0020: chip found @ 0x20 (i2c-demux (master i2c-9))
[ 78.634358] i2c i2c-9: sendbytes: NAK bailout.
[ 78.656005] kobject (ee695918): tried to init an initialized object, something is seriously wrong.
[ 78.664990] CPU: 2 PID: 1986 Comm: exercise-i2c-de Not tainted 4.9.0-rc2-00309-g8ef5284b21f6 #133
[ 78.673858] Hardware name: Generic R8A7790 (Flattened Device Tree)
[ 78.680033] Backtrace:
[ 78.682500] [<c010a094>] (dump_backtrace) from [<c010a234>] (show_stack+0x18/0x1c)
[ 78.690064] r6:c08360fc[ 78.692419] r5:00000000
r4:60000013[ 78.696000] r3:00404000
[ 78.698530]
[ 78.700026] [<c010a21c>] (show_stack) from [<c02df780>] (dump_stack+0x80/0xa0)
[ 78.707248] [<c02df700>] (dump_stack) from [<c02e1668>] (kobject_init+0x3c/0x98)
[ 78.714637] r5:c0a2c900[ 78.716992] r4:ee695918
[ 78.719521]
[ 78.721017] [<c02e162c>] (kobject_init) from [<c03baab0>] (device_initialize+0x28/0x94)
[ 78.729014] r5:c0a7db24[ 78.731368] r4:ee695910
[ 78.733897]
[ 78.735390] [<c03baa88>] (device_initialize) from [<c03bc4e0>] (device_register+0x14/0x20)
[ 78.743648] r5:00000022[ 78.746002] r4:ee695910
[ 78.748531]
[ 78.750026] [<c03bc4cc>] (device_register) from [<c04a02c4>] (__video_register_device+0xf4c/0x123c)
[ 78.759065] r4:ee695820[ 78.761419] r3:00000022
[ 78.763948]
[ 78.765441] [<c049f378>] (__video_register_device) from [<c04cd124>] (rvin_v4l2_probe+0x204/0x268)
[ 78.774393] r10:c0a3330c[ 78.776834] r9:00000000
r8:c0a34338[ 78.780414] r7:c077d784
r6:ee695b88[ 78.783995] r5:ee760654
[ 78.786524] r4:ee695810[ 78.788878]
[ 78.790370] [<c04ccf20>] (rvin_v4l2_probe) from [<c04cac5c>] (rvin_digital_notify_complete+0xe8/0x11c)
[ 78.799669] r7:00002006[ 78.802023] r6:ee695810
r5:00000000[ 78.805604] r4:ee695bcc
[ 78.808133]
[ 78.809625] [<c04cab74>] (rvin_digital_notify_complete) from [<c04af7d8>] (v4l2_async_test_notify+0xe0/0xec)
[ 78.819445] r7:c04cab74[ 78.821799] r6:ee695bfc
r5:ee760654[ 78.825380] r4:ee695bcc
[ 78.827908]
[ 78.829398] [<c04af6f8>] (v4l2_async_test_notify) from [<c04afb34>] (v4l2_async_register_subdev+0x6c/0xc4)
[ 78.839045] r7:ee760700[ 78.841399] r6:ee695bcc
r5:ee760654[ 78.844980] r4:c0a34320
[ 78.847508]
[ 78.849000] [<c04afac8>] (v4l2_async_register_subdev) from [<c049ba04>] (adv7180_probe+0x31c/0x3cc)
[ 78.858039] r8:00000001[ 78.860393] r7:ee760654
r6:00000000[ 78.863973] r5:ee760200
r4:ee760610[ 78.867554] r3:00000000
[ 78.870090] [<c049b6e8>] (adv7180_probe) from [<c0491854>] (i2c_device_probe+0x1a0/0x1f4)
[ 78.878261] r9:ee7a6000[ 78.880615] r8:c049b6e8
r7:ee760200[ 78.884195] r6:ee760204
r5:c077508c[ 78.887776] r4:ee760220
[ 78.890311] [<c04916b4>] (i2c_device_probe) from [<c03be600>] (driver_probe_device+0x134/0x2b0)
[ 78.899003] r8:ee9c0460[ 78.901357] r7:00000014
r6:c0a337d4[ 78.904937] r5:00000000
r4:ee760220[ 78.908517] r3:c04916b4
[ 78.911050] [<c03be4cc>] (driver_probe_device) from [<c03bea0c>] (__device_attach_driver+0xa4/0xb0)
[ 78.920089] r7:00000000[ 78.922443] r6:ee7a7ca8
r5:c0a337d4[ 78.926023] r4:ee760220
[ 78.928552]
[ 78.930044] [<c03be968>] (__device_attach_driver) from [<c03bd0ec>] (bus_for_each_drv+0x58/0x94)
[ 78.938822] r6:c03be968[ 78.941176] r5:ee7a7c80
r4:ee7a7ca8[ 78.944757] r3:ef1cc470
[ 78.947286]
[ 78.948777] [<c03bd094>] (bus_for_each_drv) from [<c03be384>] (__device_attach+0x8c/0x104)
[ 78.957035] r7:00000000[ 78.959389] r6:00000001
r5:ee760254[ 78.962969] r4:ee760220
[ 78.965498]
[ 78.966988] [<c03be2f8>] (__device_attach) from [<c03bea44>] (device_initial_probe+0x14/0x18)
[ 78.975506] r7:00000000[ 78.977860] r6:ee760220
r5:c0a33358[ 78.981440] r4:ee760220
[ 78.983969]
[ 78.985461] [<c03bea30>] (device_initial_probe) from [<c03bd2a0>] (bus_probe_device+0x30/0x88)
[ 78.994071] [<c03bd270>] (bus_probe_device) from [<c03bc1dc>] (device_add+0x38c/0x514)
[ 79.001981] r6:00000000[ 79.004335] r5:ee760228
r4:ee760220[ 79.007915] r3:00000000
[ 79.010444]
[ 79.011936] [<c03bbe50>] (device_add) from [<c03bc4e8>] (device_register+0x1c/0x20)
[ 79.019586] r10:ffffffed[ 79.022027] r8:ef7f4204
r7:ee760204[ 79.025607] r6:ee760220
r5:ee9c0420[ 79.029187] r4:ee760220
[ 79.031723] [<c03bc4cc>] (device_register) from [<c0491e84>] (i2c_new_device+0x114/0x184)
[ 79.039894] r4:ee760200[ 79.042248] r3:00000020
[ 79.044776]
[ 79.046268] [<c0491d70>] (i2c_new_device) from [<c04921dc>] (of_i2c_register_device+0x160/0x184)
[ 79.055047] r7:ef7f4550[ 79.057401] r6:ee9c0460
r5:ee9c0420[ 79.060981] r4:ef7f4550
[ 79.063510]
[ 79.065001] [<c049207c>] (of_i2c_register_device) from [<c0492454>] (i2c_register_adapter+0x254/0x398)
[ 79.074301] r5:ee9c0420[ 79.076655] r4:00000000
[ 79.079184]
[ 79.080676] [<c0492200>] (i2c_register_adapter) from [<c0492608>] (__i2c_add_numbered_adapter+0x70/0x94)
[ 79.090149] r8:ee9c067c[ 79.092503] r7:00000000
r6:00000002[ 79.096083] r5:0000000c
r4:ee9c0420[ 79.099663] r3:00000001
[ 79.102198] [<c0492598>] (__i2c_add_numbered_adapter) from [<c0492c58>] (i2c_add_adapter+0x3c/0xc8)
[ 79.111237] r5:ee697c10[ 79.113591] r4:ee9c0420
[ 79.116120]
[ 79.117612] [<c0492c1c>] (i2c_add_adapter) from [<c0499f84>] (i2c_demux_activate_master+0x104/0x15c)
[ 79.126737] r5:ee697c10[ 79.129092] r4:ee9c0410
[ 79.131621]
[ 79.133112] [<c0499e80>] (i2c_demux_activate_master) from [<c049a178>] (current_master_store+0xa0/0xb4)
[ 79.142499] r10:ee7a7f80[ 79.144939] r8:ee9c0650
r7:00000002[ 79.148520] r6:00000000
r5:00000002[ 79.152100] r4:ee9c0410
[ 79.154634] [<c049a0d8>] (current_master_store) from [<c03ba1ac>] (dev_attr_store+0x20/0x2c)
[ 79.163065] r8:00000051[ 79.165419] r7:ee57398c
r6:eddd8c00[ 79.169000] r5:00000002
r4:eddd8c00[ 79.172580]
[ 79.174076] [<c03ba18c>] (dev_attr_store) from [<c0240184>] (sysfs_kf_write+0x44/0x50)
[ 79.181990] [<c0240140>] (sysfs_kf_write) from [<c023f7a8>] (kernfs_fop_write+0x150/0x1b4)
[ 79.190248] r4:ee573980[ 79.192602] r3:c0240140
[ 79.195131]
[ 79.196623] [<c023f658>] (kernfs_fop_write) from [<c01e2124>] (__vfs_write+0x34/0x110)
[ 79.204533] r10:00000000[ 79.206974] r8:00022908
r7:00000002[ 79.210555] r6:ee7a7f80
r5:c023f658[ 79.214135] r4:ef157cc0
[ 79.216668] [<c01e20f0>] (__vfs_write) from [<c01e238c>] (vfs_write+0xc4/0x150)
[ 79.223971] r8:ee7a7f80[ 79.226325] r7:00022908
r6:00000002[ 79.229905] r5:00000000
r4:ef157cc0[ 79.233485]
[ 79.234975] [<c01e22c8>] (vfs_write) from [<c01e24e4>] (SyS_write+0x48/0x84)
[ 79.242018] r10:00000000[ 79.244458] r8:c0107104
r7:00022908[ 79.248039] r6:00000002
r5:ef157cc0[ 79.251619] r4:ef157cc0
[ 79.254153] [<c01e249c>] (SyS_write) from [<c0106f40>] (ret_fast_syscall+0x0/0x3c)
[ 79.261717] r7:00000004[ 79.264071] r6:000217bc
r5:00000002[ 79.267651] r4:00022908
[ 79.270180]
[ 79.271861] rcar-vin e6ef1000.video: Device registered as video34
I2C Demux: i2c-12. Master: 1:/i2c@e6530000 (1)
[ 85.313987] rcar-vin e6ef1000.video: Removing video34
[ 85.319073] Unable to handle kernel NULL pointer dereference at virtual address 00000010
[ 85.327187] pgd = edc9c000
[ 85.329940] [00000010] *pgd=7fd3a835
[ 85.333542] Internal error: Oops: 17 [#1] SMP ARM
[ 85.338248] CPU: 0 PID: 1986 Comm: exercise-i2c-de Not tainted 4.9.0-rc2-00309-g8ef5284b21f6 #133
[ 85.347115] Hardware name: Generic R8A7790 (Flattened Device Tree)
[ 85.353291] task: ef132540 task.stack: ee7a6000
[ 85.357827] PC is at klist_put+0x20/0x94
[ 85.361747] LR is at klist_del+0x14/0x18
[ 85.365667] pc : [<c064c118>] lr : [<c064c350>] psr: a0000013
[ 85.365667] sp : ee7a7c30 ip : ee7a7c50 fp : ee7a7c4c
[ 85.377139] r10: ee7a7f80 r9 : ee7a6000 r8 : 00000100
[ 85.382360] r7 : 00000001 r6 : 00000000 r5 : ee695bcc r4 : ee67a314
[ 85.388882] r3 : 00000000 r2 : 00000000 r1 : 00000001 r0 : 00000000
[ 85.395406] Flags: NzCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment none
[ 85.402537] Control: 10c5387d Table: 6dc9c06a DAC: 00000051
[ 85.408278] Process exercise-i2c-de (pid: 1986, stack limit = 0xee7a6210)
[ 85.415062] Stack: (0xee7a7c30 to 0xee7a8000)
[ 85.419416] 7c20: ee695910 ee695bcc ef2c7a10 00000000
[ 85.427590] 7c40: ee7a7c5c ee7a7c50 c064c350 c064c104 ee7a7c8c ee7a7c60 c03bae48 c064c348
[ 85.435765] 7c60: 00000200 00000100 ee7a6000 ee7a7f80 ee695910 ee695bcc ee760200 00000000
[ 85.443939] 7c80: ee7a7ca4 ee7a7c90 c03baff0 c03bae00 00000001 ee695820 ee7a7cbc ee7a7ca8
[ 85.452113] 7ca0: c04a05f8 c03bafe8 c094f360 ee695810 ee7a7cd4 ee7a7cc0 c04ccf18 c04a05c0
[ 85.460287] 7cc0: ee760654 ee695bcc ee7a7cec ee7a7cd8 c04cab00 c04cceec c04caad8 ee760654
[ 85.468461] 7ce0: ee7a7d04 ee7a7cf0 c04afc0c c04caae4 ee760654 ee760610 ee7a7d24 ee7a7d08
[ 85.476636] 7d00: c049aa14 c04afb98 c049a9f4 ee760220 c0a337d4 c0a33358 ee7a7d3c ee7a7d28
[ 85.484810] 7d20: c0491684 c049aa00 ee760220 c0a337d4 ee7a7d54 ee7a7d40 c03be8f4 c049163c
[ 85.492984] 7d40: ee760254 ee760220 ee7a7d6c ee7a7d58 c03bea94 c03be864 ee760220 ef1cc430
[ 85.501157] 7d60: ee7a7d8c ee7a7d70 c03bd3d8 c03bea7c 0000000a ee760220 ee7a7e08 ee9c0460
[ 85.509331] 7d80: ee7a7dbc ee7a7d90 c03baf44 c03bd304 eddef694 c03baddc ee7a7dc4 ee7a7da8
[ 85.517505] 7da0: ee760220 ee7a7e08 c04928a4 00000000 ee7a7dd4 ee7a7dc0 c03baff0 c03bae00
[ 85.525679] 7dc0: 00000008 ee760200 ee7a7dec ee7a7dd8 c049265c c03bafe8 00000061 ee760200
[ 85.533854] 7de0: ee7a7e04 ee7a7df0 c04928e4 c0492638 c0861000 00000000 ee7a7e2c ee7a7e08
[ 85.542027] 7e00: c03bb2ec c04928b0 ef12f200 eddefd94 ee9c0420 ee9c0460 c0a7f848 ee9c0420
[ 85.550201] 7e20: ee7a7e54 ee7a7e30 c0492e18 c03bb2b4 00000003 ee9c0410 00000002 00000002
[ 85.558375] 7e40: 00000001 00000026 ee7a7e84 ee7a7e58 c049a13c c0492d18 00000000 00000001
[ 85.566549] 7e60: ee7a7e5c ee55f640 00000002 ee55f640 eea8578c 00000051 ee7a7e94 ee7a7e88
[ 85.574723] 7e80: c03ba1ac c049a0e4 ee7a7eac ee7a7e98 c0240184 c03ba198 c0240140 eea85780
[ 85.582897] 7ea0: ee7a7edc ee7a7eb0 c023f7a8 c024014c 00000000 00000000 ee70be40 c023f658
[ 85.591071] 7ec0: ee7a7f80 00000002 00022908 00000000 ee7a7f4c ee7a7ee0 c01e2124 c023f664
[ 85.599244] 7ee0: 00000000 ee308000 ee308000 edce6800 0000000a 0000000b ede27180 0000000a
[ 85.607418] 7f00: ee7a7f3c ee7a7f10 c01fe1b8 ef39e000 0000000b ef39e000 0000000a 00000001
[ 85.615592] 7f20: ee7a7f3c ee7a7f30 ee70be40 ee70be40 00000000 00000002 00022908 ee7a7f80
[ 85.623766] 7f40: ee7a7f7c ee7a7f50 c01e238c c01e20fc c01fe64c c01fdc5c ee70be40 ee70be40
[ 85.631940] 7f60: 00000002 00022908 c0107104 00000000 ee7a7fa4 ee7a7f80 c01e24e4 c01e22d4
[ 85.640114] 7f80: 00000000 00000000 00022908 00000002 000217bc 00000004 00000000 ee7a7fa8
[ 85.648288] 7fa0: c0106f40 c01e24a8 00022908 00000002 00000001 00022908 00000002 0002290a
[ 85.656462] 7fc0: 00022908 00000002 000217bc 00000004 00000002 00000000 00022728 000219cc
[ 85.664636] 7fe0: 00000001 bef2a770 00012db1 b6eabb9c 60000010 00000001 04080020 00800000
[ 85.672806] Backtrace:
[ 85.675262] [<c064c0f8>] (klist_put) from [<c064c350>] (klist_del+0x14/0x18)
[ 85.682305] r7:00000000[ 85.684660] r6:ef2c7a10
r5:ee695bcc[ 85.688242] r4:ee695910
[ 85.690771]
[ 85.692266] [<c064c33c>] (klist_del) from [<c03bae48>] (device_del+0x54/0x1e8)
[ 85.699488] [<c03badf4>] (device_del) from [<c03baff0>] (device_unregister+0x14/0x20)
[ 85.707312] r7:00000000[ 85.709666] r6:ee760200
r5:ee695bcc[ 85.713247] r4:ee695910
[ 85.715777]
[ 85.717270] [<c03bafdc>] (device_unregister) from [<c04a05f8>] (video_unregister_device+0x44/0x4c)
[ 85.726222] r4:ee695820[ 85.728576] r3:00000001
[ 85.731106]
[ 85.732599] [<c04a05b4>] (video_unregister_device) from [<c04ccf18>] (rvin_v4l2_remove+0x38/0x40)
[ 85.741464] r4:ee695810[ 85.743818] r3:c094f360
[ 85.746347]
[ 85.747838] [<c04ccee0>] (rvin_v4l2_remove) from [<c04cab00>] (rvin_digital_notify_unbind+0x28/0x4c)
[ 85.756964] r4:ee695bcc[ 85.759318] r3:ee760654
[ 85.761847]
[ 85.763339] [<c04caad8>] (rvin_digital_notify_unbind) from [<c04afc0c>] (v4l2_async_unregister_subdev+0x80/0x90)
[ 85.773507] r4:ee760654[ 85.775861] r3:c04caad8
[ 85.778390]
[ 85.779883] [<c04afb8c>] (v4l2_async_unregister_subdev) from [<c049aa14>] (adv7180_remove+0x20/0x8c)
[ 85.789008] r5:ee760610[ 85.791363] r4:ee760654
[ 85.793892]
[ 85.795385] [<c049a9f4>] (adv7180_remove) from [<c0491684>] (i2c_device_remove+0x54/0x84)
[ 85.803555] r6:c0a33358[ 85.805909] r5:c0a337d4
r4:ee760220[ 85.809490] r3:c049a9f4
[ 85.812018]
[ 85.813511] [<c0491630>] (i2c_device_remove) from [<c03be8f4>] (__device_release_driver+0x9c/0x110)
[ 85.822550] r5:c0a337d4[ 85.824904] r4:ee760220
[ 85.827433]
[ 85.828923] [<c03be858>] (__device_release_driver) from [<c03bea94>] (device_release_driver+0x24/0x30)
[ 85.838222] r5:ee760220[ 85.840576] r4:ee760254
[ 85.843105]
[ 85.844597] [<c03bea70>] (device_release_driver) from [<c03bd3d8>] (bus_remove_device+0xe0/0xf0)
[ 85.853375] r5:ef1cc430[ 85.855730] r4:ee760220
[ 85.858259]
[ 85.859751] [<c03bd2f8>] (bus_remove_device) from [<c03baf44>] (device_del+0x150/0x1e8)
[ 85.867748] r6:ee9c0460[ 85.870102] r5:ee7a7e08
r4:ee760220[ 85.873683] r3:0000000a
[ 85.876212]
[ 85.877703] [<c03badf4>] (device_del) from [<c03baff0>] (device_unregister+0x14/0x20)
[ 85.885527] r7:00000000[ 85.887881] r6:c04928a4
r5:ee7a7e08[ 85.891462] r4:ee760220
[ 85.893991]
[ 85.895484] [<c03bafdc>] (device_unregister) from [<c049265c>] (i2c_unregister_device+0x30/0x34)
[ 85.904263] r4:ee760200[ 85.906617] r3:00000008
[ 85.909145]
[ 85.910638] [<c049262c>] (i2c_unregister_device) from [<c04928e4>] (__unregister_client+0x40/0x50)
[ 85.919590] r4:ee760200[ 85.921944] r3:00000061
[ 85.924473]
[ 85.925964] [<c04928a4>] (__unregister_client) from [<c03bb2ec>] (device_for_each_child+0x44/0x80)
[ 85.934917] r4:00000000[ 85.937270] r3:c0861000
[ 85.939799]
[ 85.941291] [<c03bb2a8>] (device_for_each_child) from [<c0492e18>] (i2c_del_adapter+0x10c/0x1ac)
[ 85.950070] r7:ee9c0420[ 85.952424] r6:c0a7f848
r5:ee9c0460[ 85.956005] r4:ee9c0420
[ 85.958534]
[ 85.960026] [<c0492d0c>] (i2c_del_adapter) from [<c049a13c>] (current_master_store+0x64/0xb4)
[ 85.968544] r8:00000026[ 85.970898] r7:00000001
r6:00000002[ 85.974479] r5:00000002
r4:ee9c0410[ 85.978059] r3:00000003
[ 85.980593] [<c049a0d8>] (current_master_store) from [<c03ba1ac>] (dev_attr_store+0x20/0x2c)
[ 85.989025] r8:00000051[ 85.991379] r7:eea8578c
r6:ee55f640[ 85.994959] r5:00000002
r4:ee55f640[ 85.998539]
[ 86.000034] [<c03ba18c>] (dev_attr_store) from [<c0240184>] (sysfs_kf_write+0x44/0x50)
[ 86.007949] [<c0240140>] (sysfs_kf_write) from [<c023f7a8>] (kernfs_fop_write+0x150/0x1b4)
[ 86.016207] r4:eea85780[ 86.018561] r3:c0240140
[ 86.021090]
[ 86.022582] [<c023f658>] (kernfs_fop_write) from [<c01e2124>] (__vfs_write+0x34/0x110)
[ 86.030493] r10:00000000[ 86.032934] r8:00022908
r7:00000002[ 86.036515] r6:ee7a7f80
r5:c023f658[ 86.040095] r4:ee70be40
[ 86.042628] [<c01e20f0>] (__vfs_write) from [<c01e238c>] (vfs_write+0xc4/0x150)
[ 86.049931] r8:ee7a7f80[ 86.052285] r7:00022908
r6:00000002[ 86.055865] r5:00000000
r4:ee70be40[ 86.059445]
[ 86.060936] [<c01e22c8>] (vfs_write) from [<c01e24e4>] (SyS_write+0x48/0x84)
[ 86.067979] r10:00000000[ 86.070419] r8:c0107104
r7:00022908[ 86.074000] r6:00000002
r5:ee70be40[ 86.077580] r4:ee70be40
[ 86.080115] [<c01e249c>] (SyS_write) from [<c0106f40>] (ret_fast_syscall+0x0/0x3c)
[ 86.087679] r7:00000004[ 86.090033] r6:000217bc
r5:00000002[ 86.093614] r4:00022908
[ 86.096143]
[ 86.097633] Code: e1a04000 e1a07001 e3c66001 e1a00006 (e5965010)
[ 86.103771] ---[ end trace f0ea74a32bf1cc0d ]---
Segmentation fault
board: gose
config: shmobile_defconfig; VIDEO_RCAR_VIN not set
# ./exercise-i2c-demux.sh
I2C Demux: i2c-11. Master: 1:/i2c-9 (1)
[ 331.304940] i2c-gpio i2c-9: using pins 941 (SDA) and 940 (SCL)
[ 331.313364] adv7180 11-0020: chip found @ 0x20 (i2c-demux (master i2c-9))
[ 331.330047] i2c i2c-9: sendbytes: NAK bailout.
I2C Demux: i2c-11. Master: 0:/i2c@e6530000 (0)
[ 337.905799] adv7180 11-0020: chip found @ 0x20 (i2c-demux (master i2c-2))
[ 338.952995] i2c-rcar e6530000.i2c: error -110 : 3
[ 339.992979] i2c-rcar e6530000.i2c: error -110 : 3
[ 341.032982] i2c-rcar e6530000.i2c: error -110 : 3
[ 341.037711] adv7180: probe of 11-0020 failed with error -110
[ 343.112988] i2c-rcar e6530000.i2c: error -110 : 2
[ 343.117722] adv7511: probe of 11-0039 failed with error -110
I2C Demux: i2c-12. Master: 1:/i2c-10 (1)
[ 349.714698] i2c-gpio i2c-10: using pins 794 (SDA) and 793 (SCL)
I2C Demux: i2c-12. Master: 0:/i2c@e6520000 (0)
[ 356.055515] i2c-rcar e6520000.i2c: probed
board: gose
config: shmobile_defconfig
# ./exercise-i2c-demux.sh
I2C Demux: i2c-11. Master: 1:/i2c-9 (1)
[ 550.437217] rcar-vin e6ef1000.video: Removing video0
[ 550.443980] i2c-gpio i2c-9: using pins 941 (SDA) and 940 (SCL)
[ 550.452007] adv7180 11-0020: chip found @ 0x20 (i2c-demux (master i2c-9))
[ 550.468789] i2c i2c-9: sendbytes: NAK bailout.
[ 550.489320] kobject (df7e7918): tried to init an initialized object, something is seriously wrong.
[ 550.498375] CPU: 0 PID: 1626 Comm: exercise-i2c-de Not tainted 4.9.0-rc2-00311-gcbca9815acde #137
[ 550.507243] Hardware name: Generic R-Car Gen2 (Flattened Device Tree)
[ 550.513679] Backtrace:
[ 550.516146] [<c010a094>] (dump_backtrace) from [<c010a234>] (show_stack+0x18/0x1c)
[ 550.523710] r6:c08360fc[ 550.526064] r5:00000000
r4:60000013[ 550.529645] r3:00400000
[ 550.532174]
[ 550.533669] [<c010a21c>] (show_stack) from [<c02df780>] (dump_stack+0x80/0xa0)
[ 550.540891] [<c02df700>] (dump_stack) from [<c02e1668>] (kobject_init+0x3c/0x98)
[ 550.548281] r5:c0a2c900[ 550.550635] r4:df7e7918
[ 550.553164]
[ 550.554659] [<c02e162c>] (kobject_init) from [<c03baab0>] (device_initialize+0x28/0x94)
[ 550.562656] r5:c0a7db24[ 550.565010] r4:df7e7910
[ 550.567540]
[ 550.569030] [<c03baa88>] (device_initialize) from [<c03bc4e0>] (device_register+0x14/0x20)
[ 550.577288] r5:00000000[ 550.579641] r4:df7e7910
[ 550.582170]
[ 550.583663] [<c03bc4cc>] (device_register) from [<c04a02c4>] (__video_register_device+0xf4c/0x123c)
[ 550.592702] r4:df7e7820[ 550.595055] r3:00000000
[ 550.597584]
[ 550.599075] [<c049f378>] (__video_register_device) from [<c04cd124>] (rvin_v4l2_probe+0x204/0x268)
[ 550.608027] r10:c0a3330c[ 550.610468] r9:00000000
r8:c0a34338[ 550.614048] r7:c077d784
r6:df7e7b88[ 550.617629] r5:debbd654
[ 550.620157] r4:df7e7810[ 550.622510]
[ 550.624002] [<c04ccf20>] (rvin_v4l2_probe) from [<c04cac5c>] (rvin_digital_notify_complete+0xe8/0x11c)
[ 550.633301] r7:00002006[ 550.635654] r6:df7e7810
r5:00000000[ 550.639235] r4:df7e7bcc
[ 550.641763]
[ 550.643254] [<c04cab74>] (rvin_digital_notify_complete) from [<c04af7d8>] (v4l2_async_test_notify+0xe0/0xec)
[ 550.653074] r7:c04cab74[ 550.655427] r6:df7e7bfc
r5:debbd654[ 550.659007] r4:df7e7bcc
[ 550.661536]
[ 550.663026] [<c04af6f8>] (v4l2_async_test_notify) from [<c04afb34>] (v4l2_async_register_subdev+0x6c/0xc4)
[ 550.672672] r7:debbd700[ 550.675026] r6:df7e7bcc
r5:debbd654[ 550.678606] r4:c0a34320
[ 550.681134]
[ 550.682626] [<c04afac8>] (v4l2_async_register_subdev) from [<c049ba04>] (adv7180_probe+0x31c/0x3cc)
[ 550.691665] r8:00000001[ 550.694018] r7:debbd654
r6:00000000[ 550.697598] r5:debbd200
r4:debbd610[ 550.701178] r3:00000000
[ 550.703714] [<c049b6e8>] (adv7180_probe) from [<c0491854>] (i2c_device_probe+0x1a0/0x1f4)
[ 550.711884] r9:ded30000[ 550.714238] r8:c049b6e8
r7:debbd200[ 550.717818] r6:debbd204
r5:c077508c[ 550.721397] r4:debbd220
[ 550.723932] [<c04916b4>] (i2c_device_probe) from [<c03be600>] (driver_probe_device+0x134/0x2b0)
[ 550.732623] r8:dec5a860[ 550.734977] r7:00000012
r6:c0a337d4[ 550.738557] r5:00000000
r4:debbd220[ 550.742137] r3:c04916b4
[ 550.744670] [<c03be4cc>] (driver_probe_device) from [<c03bea0c>] (__device_attach_driver+0xa4/0xb0)
[ 550.753708] r7:00000000[ 550.756062] r6:ded31ca8
r5:c0a337d4[ 550.759642] r4:debbd220
[ 550.762170]
[ 550.763661] [<c03be968>] (__device_attach_driver) from [<c03bd0ec>] (bus_for_each_drv+0x58/0x94)
[ 550.772439] r6:c03be968[ 550.774793] r5:ded31c80
r4:ded31ca8[ 550.778372] r3:df535d70
[ 550.780901]
[ 550.782391] [<c03bd094>] (bus_for_each_drv) from [<c03be384>] (__device_attach+0x8c/0x104)
[ 550.790649] r7:00000000[ 550.793002] r6:00000001
r5:debbd254[ 550.796582] r4:debbd220
[ 550.799110]
[ 550.800599] [<c03be2f8>] (__device_attach) from [<c03bea44>] (device_initial_probe+0x14/0x18)
[ 550.809117] r7:00000000[ 550.811471] r6:debbd220
r5:c0a33358[ 550.815051] r4:debbd220
[ 550.817579]
[ 550.819069] [<c03bea30>] (device_initial_probe) from [<c03bd2a0>] (bus_probe_device+0x30/0x88)
[ 550.827679] [<c03bd270>] (bus_probe_device) from [<c03bc1dc>] (device_add+0x38c/0x514)
[ 550.835589] r6:00000000[ 550.837943] r5:debbd228
r4:debbd220[ 550.841523] r3:00000000
[ 550.844051]
[ 550.845542] [<c03bbe50>] (device_add) from [<c03bc4e8>] (device_register+0x1c/0x20)
[ 550.853192] r10:ffffffed[ 550.855632] r8:dfbf6240
r7:debbd204[ 550.859212] r6:debbd220
r5:dec5a820[ 550.862792] r4:debbd220
[ 550.865326] [<c03bc4cc>] (device_register) from [<c0491e84>] (i2c_new_device+0x114/0x184)
[ 550.873497] r4:debbd200[ 550.875852] r3:00000020
[ 550.878380]
[ 550.879872] [<c0491d70>] (i2c_new_device) from [<c04921dc>] (of_i2c_register_device+0x160/0x184)
[ 550.888650] r7:dfbf658c[ 550.891003] r6:dec5a860
r5:dec5a820[ 550.894583] r4:dfbf658c
[ 550.897112]
[ 550.898603] [<c049207c>] (of_i2c_register_device) from [<c0492454>] (i2c_register_adapter+0x254/0x398)
[ 550.907902] r5:dec5a820[ 550.910256] r4:00000000
[ 550.912784]
[ 550.914276] [<c0492200>] (i2c_register_adapter) from [<c0492608>] (__i2c_add_numbered_adapter+0x70/0x94)
[ 550.923748] r8:dec5aa6c[ 550.926102] r7:00000000
r6:00000001[ 550.929682] r5:0000000b
r4:dec5a820[ 550.933262] r3:00000001
[ 550.935797] [<c0492598>] (__i2c_add_numbered_adapter) from [<c0492c58>] (i2c_add_adapter+0x3c/0xc8)
[ 550.944836] r5:df7e8c10[ 550.947190] r4:dec5a820
[ 550.949719]
[ 550.951210] [<c0492c1c>] (i2c_add_adapter) from [<c0499f84>] (i2c_demux_activate_master+0x104/0x15c)
[ 550.960336] r5:df7e8c10[ 550.962689] r4:dec5a810
[ 550.965218]
[ 550.966708] [<c0499e80>] (i2c_demux_activate_master) from [<c049a178>] (current_master_store+0xa0/0xb4)
[ 550.976094] r10:ded31f80[ 550.978535] r8:dec5aa50
r7:00000001[ 550.982115] r6:00000000
r5:00000002[ 550.985694] r4:dec5a810
[ 550.988228] [<c049a0d8>] (current_master_store) from [<c03ba1ac>] (dev_attr_store+0x20/0x2c)
[ 550.996659] r8:00000051[ 550.999013] r7:dee9b28c
r6:df534480[ 551.002593] r5:00000002
r4:df534480[ 551.006172]
[ 551.007667] [<c03ba18c>] (dev_attr_store) from [<c0240184>] (sysfs_kf_write+0x44/0x50)
[ 551.015581] [<c0240140>] (sysfs_kf_write) from [<c023f7a8>] (kernfs_fop_write+0x150/0x1b4)
[ 551.023839] r4:dee9b280[ 551.026193] r3:c0240140
[ 551.028721]
[ 551.030213] [<c023f658>] (kernfs_fop_write) from [<c01e2124>] (__vfs_write+0x34/0x110)
[ 551.038123] r10:00000000[ 551.040564] r8:00022900
r7:00000002[ 551.044143] r6:ded31f80
r5:c023f658[ 551.047723] r4:ded5ff00
[ 551.050255] [<c01e20f0>] (__vfs_write) from [<c01e238c>] (vfs_write+0xc4/0x150)
[ 551.057558] r8:ded31f80[ 551.059911] r7:00022900
r6:00000002[ 551.063491] r5:00000000
r4:ded5ff00[ 551.067071]
[ 551.068561] [<c01e22c8>] (vfs_write) from [<c01e24e4>] (SyS_write+0x48/0x84)
[ 551.075603] r10:00000000[ 551.078043] r8:c0107104
r7:00022900[ 551.081623] r6:00000002
r5:ded5ff00[ 551.085203] r4:ded5ff00
[ 551.087737] [<c01e249c>] (SyS_write) from [<c0106f40>] (ret_fast_syscall+0x0/0x3c)
[ 551.095300] r7:00000004[ 551.097653] r6:000217bc
r5:00000002[ 551.101234] r4:00022900
[ 551.103762]
[ 551.105893] rcar-vin e6ef1000.video: Device registered as video0
[ 551.666091] Unable to handle kernel NULL pointer dereference at virtual address 00000001
[ 551.674187] pgd = c0004000
[ 551.676891] [00000001] *pgd=00000000
[ 551.680475] Internal error: Oops: 5 [#1] SMP ARM
[ 551.685093] CPU: 1 PID: 1641 Comm: modprobe Not tainted 4.9.0-rc2-00311-gcbca9815acde #137
[ 551.693352] Hardware name: Generic R-Car Gen2 (Flattened Device Tree)
[ 551.699787] task: df798000 task.stack: dee86000
[ 551.704330] PC is at __wake_up_common+0x28/0x80
[ 551.708857] LR is at __wake_up_locked+0x1c/0x24
[ 551.713384] pc : [<c015374c>] lr : [<c0153a1c>] psr: 40000093
[ 551.713384] sp : dee87da8 ip : dee87dd8 fp : dee87dd4
[ 551.724855] r10: 00000000 r9 : 00000000 r8 : 00000003
[ 551.730075] r7 : 00000001 r6 : df7e5800 r5 : df7e5880 r4 : df7e5820
[ 551.736597] r3 : 00000001 r2 : 00000001 r1 : 00000003 r0 : fffffff5
[ 551.743120] Flags: nZcv IRQs off FIQs on Mode SVC_32 ISA ARM Segment none
[ 551.750337] Control: 10c5387d Table: 5e42806a DAC: 00000051
[ 551.756078] Process modprobe (pid: 1641, stack limit = 0xdee86210)
[ 551.762253] Stack: (0xdee87da8 to 0xdee88000)
[ 551.766607] 7da0: 00000000 00000000 df7e5880 df7e5800 40000093 00000000
[ 551.774781] 7dc0: 00000000 00000000 dee87dec dee87dd8 c0153a1c c0153730 00000000 c0140ba0
[ 551.782955] 7de0: dee87e14 dee87df0 c021f268 c0153a0c dec0bf8c 00000000 dec0bf80 00000001
[ 551.791128] 7e00: 00000003 00000000 dee87e44 dee87e18 c0153770 c021f138 00000000 dec0bf88
[ 551.799302] 7e20: 20000093 00000001 00000003 00000000 dee86000 00000001 dee87e74 dee87e48
[ 551.807476] 7e40: c01539ec c0153730 00000000 dee87e58 c01296bc dee87eb0 00000011 df798540
[ 551.815649] 7e60: df4a26e4 de4d87e0 dee87e9c dee87e78 c012a7fc c01539b8 df798000 00000011
[ 551.823822] 7e80: 00000000 dec0bf84 60000093 dec0ba80 dee87eac dee87ea0 c012a864 c012a634
[ 551.831996] 7ea0: dee87f54 dee87eb0 c012bb40 c012a85c 00000011 00000000 00040001 00000669
[ 551.840169] 7ec0: 00000000 00000001 00000000 00000000 dee87efc dee87ee0 c018ff8c c018fe60
[ 551.848343] 7ee0: c01e39b0 df79844c df798464 00000000 dee87f54 dee87f00 c019af1c c018ed80
[ 551.856517] 7f00: c013a890 c0102448 ffffffff df798000 dee87f58 00000000 dedb88f8 c0107104
[ 551.864690] 7f20: dee87f44 dee87f30 c013a990 df798000 df798000 c0a0a1b4 df432a80 dedb88f8
[ 551.872864] 7f40: df7982a0 00000001 dee87f74 dee87f58 c0121fdc c012b9ac dee87f58 dee87f58
[ 551.881037] 7f60: c01e0000 000000f8 dee87f94 dee87f78 c012226c c01218a8 00000001 0006f42e
[ 551.889211] 7f80: b6ec0774 b6ec0774 dee87fa4 dee87f98 c01222bc c01221d4 00000000 dee87fa8
[ 551.897384] 7fa0: c0106f40 c01222b0 0006f42e b6ec0774 00000001 0006f41a b6de04c0 00000001
[ 551.905558] 7fc0: 0006f42e b6ec0774 b6ec0774 000000f8 00000000 00000000 7f612000 00000000
[ 551.913731] 7fe0: 000000f8 be82cc7c b6e52c73 b6df7f96 60000030 00000001 00000000 00000000
[ 551.921901] Backtrace:
[ 551.924357] [<c0153724>] (__wake_up_common) from [<c0153a1c>] (__wake_up_locked+0x1c/0x24)
[ 551.932614] r10:00000000[ 551.935056] r9:00000000
r8:00000000[ 551.938637] r7:40000093
r6:df7e5800[ 551.942217] r5:df7e5880
[ 551.944746] r4:00000000[ 551.947100] r3:00000000
[ 551.949629]
[ 551.951123] [<c0153a00>] (__wake_up_locked) from [<c021f268>] (ep_poll_callback+0x13c/0x188)
[ 551.959558] [<c021f12c>] (ep_poll_callback) from [<c0153770>] (__wake_up_common+0x4c/0x80)
[ 551.967816] r10:00000000[ 551.970257] r8:00000003
r7:00000001[ 551.973837] r6:dec0bf80
r5:00000000[ 551.977417] r4:dec0bf8c
[ 551.979951] [<c0153724>] (__wake_up_common) from [<c01539ec>] (__wake_up+0x40/0x54)
[ 551.987601] r10:00000001[ 551.990041] r9:dee86000
r8:00000000[ 551.993621] r7:00000003
r6:00000001[ 551.997201] r5:20000093
[ 551.999731] r4:dec0bf88[ 552.002084] r3:00000000
[ 552.004613]
[ 552.006107] [<c01539ac>] (__wake_up) from [<c012a7fc>] (__send_signal.constprop.11+0x1d4/0x228)
[ 552.014798] r8:de4d87e0[ 552.017152] r7:df4a26e4
r6:df798540[ 552.020733] r5:00000011
r4:dee87eb0[ 552.024312]
[ 552.025803] [<c012a628>] (__send_signal.constprop.11) from [<c012a864>] (__group_send_sig_info+0x14/0x18)
[ 552.035363] r10:dec0ba80[ 552.037803] r8:60000093
r7:dec0bf84[ 552.041383] r6:00000000
r5:00000011[ 552.044963] r4:df798000
[ 552.047498] [<c012a850>] (__group_send_sig_info) from [<c012bb40>] (do_notify_parent+0x1a0/0x1d4)
[ 552.056369] [<c012b9a0>] (do_notify_parent) from [<c0121fdc>] (do_exit+0x740/0x8f0)
[ 552.064019] r10:00000001[ 552.066459] r8:df7982a0
r7:dedb88f8[ 552.070039] r6:df432a80
r5:c0a0a1b4[ 552.073619] r4:df798000
[ 552.076152] [<c012189c>] (do_exit) from [<c012226c>] (do_group_exit+0xa4/0xdc)
[ 552.083368] r7:000000f8[ 552.085721]
[ 552.087213] [<c01221c8>] (do_group_exit) from [<c01222bc>] (__wake_up_parent+0x0/0x28)
[ 552.095123] r6:b6ec0774[ 552.097477] r5:b6ec0774
r4:0006f42e[ 552.101057] r3:00000001
[ 552.103585]
[ 552.105078] [<c01222a4>] (SyS_exit_group) from [<c0106f40>] (ret_fast_syscall+0x0/0x3c)
[ 552.113079] Code: e1a08001 e1a07002 e59b9004 e243000c (e5936000)
[ 552.119171] ---[ end trace cfb3b2a0c087658f ]---
[ 552.123783] Fixing recursive fault but reboot is needed!
board: gose
config: shmobile_defconfig; VIDEO_RCAR_VIN not set
# ./exercise-i2c-demux.sh
I2C Demux: i2c-11. Master: 1:/i2c-9 (1)
[ 49.817290] i2c-gpio i2c-9: using pins 871 (SDA) and 870 (SCL)
[ 49.825956] adv7180 11-0020: chip found @ 0x20 (i2c-demux (master i2c-9))
[ 49.839765] i2c i2c-9: sendbytes: NAK bailout.
I2C Demux: i2c-11. Master: 0:/i2c@e6518000 (0)
[ 55.906915] i2c-rcar e6518000.i2c: probed
[ 55.915331] adv7180 11-0020: chip found @ 0x20 (i2c-demux (master i2c-1))
I2C Demux: i2c-14. Master: 1:/i2c-10 (1)
[ 62.006474] i2c-gpio i2c-10: using pins 879 (SDA) and 878 (SCL)
I2C Demux: i2c-14. Master: 0:/i2c@e6520000 (0)
[ 68.057683] i2c-rcar e6520000.i2c: probed
board: alt
config: shmobile_defconfig
# ./exercise-i2c-demux.sh
I2C Demux: i2c-11. Master: 1:/i2c-9 (1)
[ 61.260098] rcar-vin e6ef0000.video: Removing video17
[ 61.280808] i2c-gpio i2c-9: using pins 871 (SDA) and 870 (SCL)
[ 61.288914] adv7180 11-0020: chip found @ 0x20 (i2c-demux (master i2c-9))
[ 61.302768] i2c i2c-9: sendbytes: NAK bailout.
[ 61.333307] kobject (eeac0918): tried to init an initialized object, something is seriously wrong.
[ 61.342369] CPU: 0 PID: 1534 Comm: exercise-i2c-de Not tainted 4.9.0-rc2-00312-g11ee7f001b13 #148
[ 61.351239] Hardware name: Generic R-Car Gen2 (Flattened Device Tree)
[ 61.357678] Backtrace:
[ 61.360155] [<c010a094>] (dump_backtrace) from [<c010a234>] (show_stack+0x18/0x1c)
[ 61.367721] r6:c08360fc[ 61.370076] r5:00000000
r4:60000013[ 61.373660] r3:00400000
[ 61.376191]
[ 61.377690] [<c010a21c>] (show_stack) from [<c02df780>] (dump_stack+0x80/0xa0)
[ 61.384917] [<c02df700>] (dump_stack) from [<c02e1668>] (kobject_init+0x3c/0x98)
[ 61.392309] r5:c0a2c900[ 61.394665] r4:eeac0918
[ 61.397195]
[ 61.398696] [<c02e162c>] (kobject_init) from [<c03baab0>] (device_initialize+0x28/0x94)
[ 61.406695] r5:c0a7db24[ 61.409051] r4:eeac0910
[ 61.411581]
[ 61.413078] [<c03baa88>] (device_initialize) from [<c03bc4e0>] (device_register+0x14/0x20)
[ 61.421337] r5:00000011[ 61.423693] r4:eeac0910
[ 61.426223]
[ 61.427723] [<c03bc4cc>] (device_register) from [<c04a02c4>] (__video_register_device+0xf4c/0x123c)
[ 61.436764] r4:eeac0820[ 61.439120] r3:00000011
[ 61.441650]
[ 61.443147] [<c049f378>] (__video_register_device) from [<c04cd124>] (rvin_v4l2_probe+0x204/0x268)
[ 61.452102] r10:c0a3330c[ 61.454544] r9:00000000
r8:c0a34338[ 61.458129] r7:c077d784
r6:eeac0b88[ 61.461712] r5:eeae8654
[ 61.464244] r4:eeac0810[ 61.466598]
[ 61.468095] [<c04ccf20>] (rvin_v4l2_probe) from [<c04cac5c>] (rvin_digital_notify_complete+0xe8/0x11c)
[ 61.477396] r7:00002006[ 61.479752] r6:eeac0810
r5:00000000[ 61.483335] r4:eeac0bcc
[ 61.485866]
[ 61.487363] [<c04cab74>] (rvin_digital_notify_complete) from [<c04af7d8>] (v4l2_async_test_notify+0xe0/0xec)
[ 61.497185] r7:c04cab74[ 61.499541] r6:eeac0bfc
r5:eeae8654[ 61.503124] r4:eeac0bcc
[ 61.505655]
[ 61.507150] [<c04af6f8>] (v4l2_async_test_notify) from [<c04afb34>] (v4l2_async_register_subdev+0x6c/0xc4)
[ 61.516799] r7:eeae8700[ 61.519154] r6:eeac0bcc
r5:eeae8654[ 61.522738] r4:c0a34320
[ 61.525268]
[ 61.526767] [<c04afac8>] (v4l2_async_register_subdev) from [<c049ba04>] (adv7180_probe+0x31c/0x3cc)
[ 61.535808] r8:00000001[ 61.538164] r7:eeae8654
r6:00000000[ 61.541747] r5:ef33c600
r4:eeae8610[ 61.545331] r3:00000000
[ 61.547873] [<c049b6e8>] (adv7180_probe) from [<c0491854>] (i2c_device_probe+0x1a0/0x1f4)
[ 61.556046] r9:ef1f0000[ 61.558402] r8:c049b6e8
r7:ef33c600[ 61.561986] r6:ef33c604
r5:c077508c[ 61.565570] r4:ef33c620
[ 61.568111] [<c04916b4>] (i2c_device_probe) from [<c03be600>] (driver_probe_device+0x134/0x2b0)
[ 61.576805] r8:ee8d9c60[ 61.579161] r7:0000000a
r6:c0a337d4[ 61.582744] r5:00000000
r4:ef33c620[ 61.586328] r3:c04916b4
[ 61.588867] [<c03be4cc>] (driver_probe_device) from [<c03bea0c>] (__device_attach_driver+0xa4/0xb0)
[ 61.597907] r7:00000000[ 61.600263] r6:ef1f1ca8
r5:c0a337d4[ 61.603846] r4:ef33c620
[ 61.606377]
[ 61.607873] [<c03be968>] (__device_attach_driver) from [<c03bd0ec>] (bus_for_each_drv+0x58/0x94)
[ 61.616654] r6:c03be968[ 61.619010] r5:ef1f1c80
r4:ef1f1ca8[ 61.622594] r3:ef10ce70
[ 61.625124]
[ 61.626620] [<c03bd094>] (bus_for_each_drv) from [<c03be384>] (__device_attach+0x8c/0x104)
[ 61.634880] r7:00000000[ 61.637235] r6:00000001
r5:ef33c654[ 61.640820] r4:ef33c620
[ 61.643350]
[ 61.644845] [<c03be2f8>] (__device_attach) from [<c03bea44>] (device_initial_probe+0x14/0x18)
[ 61.653365] r7:00000000[ 61.655720] r6:ef33c620
r5:c0a33358[ 61.659304] r4:ef33c620
[ 61.661835]
[ 61.663331] [<c03bea30>] (device_initial_probe) from [<c03bd2a0>] (bus_probe_device+0x30/0x88)
[ 61.671946] [<c03bd270>] (bus_probe_device) from [<c03bc1dc>] (device_add+0x38c/0x514)
[ 61.679858] r6:00000000[ 61.682213] r5:ef33c628
r4:ef33c620[ 61.685797] r3:00000000
[ 61.688328]
[ 61.689824] [<c03bbe50>] (device_add) from [<c03bc4e8>] (device_register+0x1c/0x20)
[ 61.697476] r10:ffffffed[ 61.699919] r8:ef7f5928
r7:ef33c604[ 61.703503] r6:ef33c620
r5:ee8d9c20[ 61.707087] r4:ef33c620
[ 61.709628] [<c03bc4cc>] (device_register) from [<c0491e84>] (i2c_new_device+0x114/0x184)
[ 61.717801] r4:ef33c600[ 61.720157] r3:00000020
[ 61.722687]
[ 61.724185] [<c0491d70>] (i2c_new_device) from [<c04921dc>] (of_i2c_register_device+0x160/0x184)
[ 61.732965] r7:ef7f5ac8[ 61.735321] r6:ee8d9c60
r5:ee8d9c20[ 61.738905] r4:ef7f5ac8
[ 61.741436]
[ 61.742933] [<c049207c>] (of_i2c_register_device) from [<c0492454>] (i2c_register_adapter+0x254/0x398)
[ 61.752235] r5:ee8d9c20[ 61.754590] r4:00000000
[ 61.757121]
[ 61.758618] [<c0492200>] (i2c_register_adapter) from [<c0492608>] (__i2c_add_numbered_adapter+0x70/0x94)
[ 61.768093] r8:ee8d9e6c[ 61.770449] r7:00000000
r6:00000001[ 61.774033] r5:0000000b
r4:ee8d9c20[ 61.777616] r3:00000001
[ 61.780157] [<c0492598>] (__i2c_add_numbered_adapter) from [<c0492c58>] (i2c_add_adapter+0x3c/0xc8)
[ 61.789198] r5:ee8d9810[ 61.791554] r4:ee8d9c20
[ 61.794084]
[ 61.795581] [<c0492c1c>] (i2c_add_adapter) from [<c0499f84>] (i2c_demux_activate_master+0x104/0x15c)
[ 61.804709] r5:ee8d9810[ 61.807065] r4:ee8d9c10
[ 61.809595]
[ 61.811091] [<c0499e80>] (i2c_demux_activate_master) from [<c049a178>] (current_master_store+0xa0/0xb4)
[ 61.820480] r10:ef1f1f80[ 61.822922] r8:ee8d9e50
r7:00000001[ 61.826505] r6:00000000
r5:00000002[ 61.830088] r4:ee8d9c10
[ 61.832628] [<c049a0d8>] (current_master_store) from [<c03ba1ac>] (dev_attr_store+0x20/0x2c)
[ 61.841061] r8:00000051[ 61.843417] r7:eebc1c8c
r6:eeae2b80[ 61.847000] r5:00000002
r4:eeae2b80[ 61.850582]
[ 61.852083] [<c03ba18c>] (dev_attr_store) from [<c0240184>] (sysfs_kf_write+0x44/0x50)
[ 61.860003] [<c0240140>] (sysfs_kf_write) from [<c023f7a8>] (kernfs_fop_write+0x150/0x1b4)
[ 61.868263] r4:eebc1c80[ 61.870619] r3:c0240140
[ 61.873149]
[ 61.874647] [<c023f658>] (kernfs_fop_write) from [<c01e2124>] (__vfs_write+0x34/0x110)
[ 61.882559] r10:00000000[ 61.885002] r8:00022900
r7:00000002[ 61.888585] r6:ef1f1f80
r5:c023f658[ 61.892169] r4:ee9409c0
[ 61.894706] [<c01e20f0>] (__vfs_write) from [<c01e238c>] (vfs_write+0xc4/0x150)
[ 61.902011] r8:ef1f1f80[ 61.904367] r7:00022900
r6:00000002[ 61.907950] r5:00000000
r4:ee9409c0[ 61.911532]
[ 61.913027] [<c01e22c8>] (vfs_write) from [<c01e24e4>] (SyS_write+0x48/0x84)
[ 61.920072] r10:00000000[ 61.922515] r8:c0107104
r7:00022900[ 61.926098] r6:00000002
r5:ee9409c0[ 61.929682] r4:ee9409c0
[ 61.932221] [<c01e249c>] (SyS_write) from [<c0106f40>] (ret_fast_syscall+0x0/0x3c)
[ 61.939786] r7:00000004[ 61.942142] r6:000217bc
r5:00000002[ 61.945725] r4:00022900
[ 61.948256]
[ 61.964248] rcar-vin e6ef0000.video: Device registered as video17
[ 61.971575] Unable to handle kernel paging request at virtual address ef180c38
[ 61.978804] pgd = ee4a4000
[ 61.981510] [ef180c38] *pgd=6f01141e(bad)
[ 61.985543] Internal error: Oops: 8000000d [#1] SMP ARM
[ 61.990775] CPU: 0 PID: 1540 Comm: udevd Not tainted 4.9.0-rc2-00312-g11ee7f001b13 #148
[ 61.998775] Hardware name: Generic R-Car Gen2 (Flattened Device Tree)
[ 62.005213] task: ef37c540 task.stack: ef24a000
[ 62.009744] PC is at 0xef180c38
[ 62.012892] LR is at ep_send_events_proc+0x9c/0x1c4
[ 62.017771] pc : [<ef180c38>] lr : [<c021e818>] psr: 60000013
[ 62.017771] sp : ef24be80 ip : ef24bec8 fp : ef24bec4
[ 62.029246] r10: ef24bf60 r9 : 00000000 r8 : bec41d00
[ 62.034469] r7 : 00000000 r6 : eeac148c r5 : eeac1e00 r4 : ef24bec8
[ 62.040994] r3 : ef180c38 r2 : ef24bec8 r1 : ef24be90 r0 : ef180d04
[ 62.047522] Flags: nZCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment none
[ 62.054655] Control: 10c5387d Table: 6e4a406a DAC: 00000051
[ 62.060399] Process udevd (pid: 1540, stack limit = 0xef24a210)
[ 62.066317] Stack: (0xef24be80 to 0xef24c000)
[ 62.070678] be80: ef24a000 2ee74000 ef24bf2c ef24be98 00000000 00000019 c0544cf0 eeac1e00
[ 62.078858] bea0: eeac1e34 00000000 c021e77c ef24bf60 ffffffff eebd6240 ef24befc ef24bec8
[ 62.087037] bec0: c021efe0 c021e788 ef24bec8 ef24bec8 00000000 00000000 eeac1e00 00000000
[ 62.095216] bee0: 00000000 00000001 00000004 eebd6240 ef24bfa4 ef24bf00 c0220124 c021ef48
[ 62.103395] bf00: 00000000 ef37c540 ef7c8780 ef311a80 ee4bf540 eeb4cc40 00000000 00000000
[ 62.111575] bf20: bec41d00 eebd6240 c06505d4 00000001 ef37c540 c0140b94 00000100 00000200
[ 62.119754] bf40: ef24bf60 00000000 00000000 c0650714 00000000 00000000 bec41d60 ef24bfb0
[ 62.127934] bf60: 00000004 bec41d00 00000121 c0107104 ef24a000 00000000 ef24bf94 0003a270
[ 62.136113] bf80: 0002a0a8 00029268 000000fc c0107104 ef24a000 00000000 00000000 ef24bfa8
[ 62.144293] bfa0: c0106f40 c021fe4c 0003a270 0002a0a8 00000004 bec41d00 00000004 ffffffff
[ 62.152471] bfc0: 0003a270 0002a0a8 00029268 000000fc 00000000 0002fb30 0000000b 0002926c
[ 62.160650] bfe0: 0002a008 bec41c68 00015941 b6ee8d2c 60000010 00000004 00000000 00000000
[ 62.168822] Backtrace:
[ 62.171285] [<c021e77c>] (ep_send_events_proc) from [<c021efe0>] (ep_scan_ready_list+0xa4/0x1b8)
[ 62.180066] r10:eebd6240[ 62.182509] r9:ffffffff
r8:ef24bf60[ 62.186093] r7:c021e77c
r6:00000000[ 62.189676] r5:eeac1e34
[ 62.192207] r4:eeac1e00[ 62.194562]
[ 62.196059] [<c021ef3c>] (ep_scan_ready_list) from [<c0220124>] (SyS_epoll_wait+0x2e4/0x380)
[ 62.204492] r10:eebd6240[ 62.206935] r9:00000004
r8:00000001[ 62.210518] r7:00000000
r6:00000000[ 62.214101] r5:eeac1e00
[ 62.216633] r4:00000000[ 62.218987]
[ 62.220487] [<c021fe40>] (SyS_epoll_wait) from [<c0106f40>] (ret_fast_syscall+0x0/0x3c)
[ 62.228487] r10:00000000[ 62.230929] r9:ef24a000
r8:c0107104[ 62.234513] r7:000000fc
r6:00029268[ 62.238096] r5:0002a0a8
[ 62.240627] r4:0003a270[ 62.242981]
[ 62.244477] Code: ef20f528 ef180ca8 00000001 ef00665c (ef180b38)
[ 62.250573] ---[ end trace 2d55ad213b142958 ]---
I2C Demux: i2c-11. Master: 0:/i2c@e6518000 (0)
[ 68.290086] rcar-vin e6ef0000.video: Removing video17
[ 68.296630] Unable to handle kernel NULL pointer dereference at virtual address 00000004
[ 68.304812] pgd = ef24c000
[ 68.307519] [00000004] *pgd=7fc89835
[ 68.311133] Internal error: Oops: 817 [#2] SMP ARM
[ 68.315932] CPU: 0 PID: 1534 Comm: exercise-i2c-de Tainted: G D 4.9.0-rc2-00312-g11ee7f001b13 #148
[ 68.326015] Hardware name: Generic R-Car Gen2 (Flattened Device Tree)
[ 68.332454] task: ef380000 task.stack: ef1f0000
[ 68.336994] PC is at driver_deferred_probe_del+0x34/0x54
[ 68.342305] LR is at driver_deferred_probe_del+0x18/0x54
[ 68.347618] pc : [<c03be1ac>] lr : [<c03be190>] psr: a0000013
[ 68.347618] sp : ef1f1c48 ip : ef1f1c48 fp : ef1f1c5c
[ 68.359093] r10: ef1f1f80 r9 : ef1f0000 r8 : 00000100
[ 68.364316] r7 : 00000000 r6 : ef182610 r5 : ee8a6e38 r4 : eeac0910
[ 68.370841] r3 : eeac1480 r2 : eeac14c4 r1 : 0000000b r0 : 00000000
[ 68.377368] Flags: NzCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment none
[ 68.384501] Control: 10c5387d Table: 6f24c06a DAC: 00000051
[ 68.390245] Process exercise-i2c-de (pid: 1534, stack limit = 0xef1f0210)
[ 68.397031] Stack: (0xef1f1c48 to 0xef1f2000)
[ 68.401390] 1c40: 00000040 eeac0910 ef1f1c8c ef1f1c60 c03baf54 c03be184
[ 68.409570] 1c60: 3a313800 00003734 ef1f0000 ef1f1f80 eeac0910 eeac0bcc ef33c600 00000000
[ 68.417749] 1c80: ef1f1ca4 ef1f1c90 c03baff0 c03bae00 00000001 eeac0820 ef1f1cbc ef1f1ca8
[ 68.425929] 1ca0: c04a05f8 c03bafe8 c094f360 eeac0810 ef1f1cd4 ef1f1cc0 c04ccf18 c04a05c0
[ 68.434109] 1cc0: eeae8654 eeac0bcc ef1f1cec ef1f1cd8 c04cab00 c04cceec c04caad8 eeae8654
[ 68.442289] 1ce0: ef1f1d04 ef1f1cf0 c04afc0c c04caae4 eeae8654 eeae8610 ef1f1d24 ef1f1d08
[ 68.450469] 1d00: c049aa14 c04afb98 c049a9f4 ef33c620 c0a337d4 c0a33358 ef1f1d3c ef1f1d28
[ 68.458648] 1d20: c0491684 c049aa00 ef33c620 c0a337d4 ef1f1d54 ef1f1d40 c03be8f4 c049163c
[ 68.466828] 1d40: ef33c654 ef33c620 ef1f1d6c ef1f1d58 c03bea94 c03be864 ef33c620 ef10ce30
[ 68.475008] 1d60: ef1f1d8c ef1f1d70 c03bd3d8 c03bea7c 0000000a ef33c620 ef1f1e08 ee8d9c60
[ 68.483187] 1d80: ef1f1dbc ef1f1d90 c03baf44 c03bd304 ef1f1db4 00000000 00000044 10b0761e
[ 68.491366] 1da0: ef33c620 ef1f1e08 c04928a4 00000000 ef1f1dd4 ef1f1dc0 c03baff0 c03bae00
[ 68.499546] 1dc0: 00000008 ef33c600 ef1f1dec ef1f1dd8 c049265c c03bafe8 00000061 ef33c600
[ 68.507726] 1de0: ef1f1e04 ef1f1df0 c04928e4 c0492638 ee8d7380 00000000 ef1f1e2c ef1f1e08
[ 68.515906] 1e00: c03bb2ec c04928b0 ee8d7380 ee426b14 ee8d9c20 ee8d9c60 c0a7f848 ee8d9c20
[ 68.524085] 1e20: ef1f1e54 ef1f1e30 c0492e18 c03bb2b4 00000002 ee8d9c10 00000002 00000001
[ 68.532264] 1e40: 00000000 00000025 ef1f1e84 ef1f1e58 c049a13c c0492d18 00000000 00000000
[ 68.540444] 1e60: ef1f1e5c eeb27800 00000002 eeb27800 eebc130c 00000051 ef1f1e94 ef1f1e88
[ 68.548624] 1e80: c03ba1ac c049a0e4 ef1f1eac ef1f1e98 c0240184 c03ba198 c0240140 eebc1300
[ 68.556803] 1ea0: ef1f1edc ef1f1eb0 c023f7a8 c024014c 00000000 00000000 eebd8180 c023f658
[ 68.564982] 1ec0: ef1f1f80 00000002 00022900 00000000 ef1f1f4c ef1f1ee0 c01e2124 c023f664
[ 68.573161] 1ee0: 00000000 ef10f000 ef10f000 ee476b00 0000000a 0000000b ee4d32c0 0000000a
[ 68.581340] 1f00: ef1f1f3c ef1f1f10 c01fe1b8 ee90d780 0000000b ee90d780 0000000a 00000001
[ 68.589520] 1f20: ef1f1f3c ef1f1f30 eebd8180 eebd8180 00000000 00000002 00022900 ef1f1f80
[ 68.597699] 1f40: ef1f1f7c ef1f1f50 c01e238c c01e20fc c01fe64c c01fdc5c eebd8180 eebd8180
[ 68.605879] 1f60: 00000002 00022900 c0107104 00000000 ef1f1fa4 ef1f1f80 c01e24e4 c01e22d4
[ 68.614057] 1f80: 00000000 00000000 00022900 00000002 000217bc 00000004 00000000 ef1f1fa8
[ 68.622236] 1fa0: c0106f40 c01e24a8 00022900 00000002 00000001 00022900 00000002 00022902
[ 68.630415] 1fc0: 00022900 00000002 000217bc 00000004 00000002 00000000 000226f0 000219cc
[ 68.638594] 1fe0: 00000001 be8db770 00012db1 b6f2fb9c 60000010 00000001 00000000 00000000
[ 68.646765] Backtrace:
[ 68.649229] [<c03be178>] (driver_deferred_probe_del) from [<c03baf54>] (device_del+0x160/0x1e8)
[ 68.657924] r4:eeac0910[ 68.660280] r3:00000040
[ 68.662810]
[ 68.664307] [<c03badf4>] (device_del) from [<c03baff0>] (device_unregister+0x14/0x20)
[ 68.672132] r7:00000000[ 68.674488] r6:ef33c600
r5:eeac0bcc[ 68.678071] r4:eeac0910
[ 68.680601]
[ 68.682099] [<c03bafdc>] (device_unregister) from [<c04a05f8>] (video_unregister_device+0x44/0x4c)
[ 68.691053] r4:eeac0820[ 68.693408] r3:00000001
[ 68.695939]
[ 68.697436] [<c04a05b4>] (video_unregister_device) from [<c04ccf18>] (rvin_v4l2_remove+0x38/0x40)
[ 68.706303] r4:eeac0810[ 68.708659] r3:c094f360
[ 68.711189]
[ 68.712684] [<c04ccee0>] (rvin_v4l2_remove) from [<c04cab00>] (rvin_digital_notify_unbind+0x28/0x4c)
[ 68.721812] r4:eeac0bcc[ 68.724168] r3:eeae8654
[ 68.726698]
[ 68.728194] [<c04caad8>] (rvin_digital_notify_unbind) from [<c04afc0c>] (v4l2_async_unregister_subdev+0x80/0x90)
[ 68.738363] r4:eeae8654[ 68.740719] r3:c04caad8
[ 68.743249]
[ 68.744747] [<c04afb8c>] (v4l2_async_unregister_subdev) from [<c049aa14>] (adv7180_remove+0x20/0x8c)
[ 68.753875] r5:eeae8610[ 68.756231] r4:eeae8654
[ 68.758760]
[ 68.760259] [<c049a9f4>] (adv7180_remove) from [<c0491684>] (i2c_device_remove+0x54/0x84)
[ 68.768432] r6:c0a33358[ 68.770787] r5:c0a337d4
r4:ef33c620[ 68.774371] r3:c049a9f4
[ 68.776901]
[ 68.778397] [<c0491630>] (i2c_device_remove) from [<c03be8f4>] (__device_release_driver+0x9c/0x110)
[ 68.787438] r5:c0a337d4[ 68.789793] r4:ef33c620
[ 68.792323]
[ 68.793818] [<c03be858>] (__device_release_driver) from [<c03bea94>] (device_release_driver+0x24/0x30)
[ 68.803119] r5:ef33c620[ 68.805475] r4:ef33c654
[ 68.808005]
[ 68.809502] [<c03bea70>] (device_release_driver) from [<c03bd3d8>] (bus_remove_device+0xe0/0xf0)
[ 68.818283] r5:ef10ce30[ 68.820638] r4:ef33c620
[ 68.823168]
[ 68.824664] [<c03bd2f8>] (bus_remove_device) from [<c03baf44>] (device_del+0x150/0x1e8)
[ 68.832663] r6:ee8d9c60[ 68.835019] r5:ef1f1e08
r4:ef33c620[ 68.838602] r3:0000000a
[ 68.841132]
[ 68.842628] [<c03badf4>] (device_del) from [<c03baff0>] (device_unregister+0x14/0x20)
[ 68.850453] r7:00000000[ 68.852809] r6:c04928a4
r5:ef1f1e08[ 68.856392] r4:ef33c620
[ 68.858923]
[ 68.860420] [<c03bafdc>] (device_unregister) from [<c049265c>] (i2c_unregister_device+0x30/0x34)
[ 68.869200] r4:ef33c600[ 68.871555] r3:00000008
[ 68.874085]
[ 68.875583] [<c049262c>] (i2c_unregister_device) from [<c04928e4>] (__unregister_client+0x40/0x50)
[ 68.884537] r4:ef33c600[ 68.886893] r3:00000061
[ 68.889423]
[ 68.890919] [<c04928a4>] (__unregister_client) from [<c03bb2ec>] (device_for_each_child+0x44/0x80)
[ 68.899873] r4:00000000[ 68.902229] r3:ee8d7380
[ 68.904759]
[ 68.906256] [<c03bb2a8>] (device_for_each_child) from [<c0492e18>] (i2c_del_adapter+0x10c/0x1ac)
[ 68.915037] r7:ee8d9c20[ 68.917392] r6:c0a7f848
r5:ee8d9c60[ 68.920976] r4:ee8d9c20
[ 68.923506]
[ 68.925002] [<c0492d0c>] (i2c_del_adapter) from [<c049a13c>] (current_master_store+0x64/0xb4)
[ 68.933522] r8:00000025[ 68.935878] r7:00000000
r6:00000001[ 68.939461] r5:00000002
r4:ee8d9c10[ 68.943044] r3:00000002
[ 68.945583] [<c049a0d8>] (current_master_store) from [<c03ba1ac>] (dev_attr_store+0x20/0x2c)
[ 68.954015] r8:00000051[ 68.956372] r7:eebc130c
r6:eeb27800[ 68.959955] r5:00000002
r4:eeb27800[ 68.963537]
[ 68.965038] [<c03ba18c>] (dev_attr_store) from [<c0240184>] (sysfs_kf_write+0x44/0x50)
[ 68.972958] [<c0240140>] (sysfs_kf_write) from [<c023f7a8>] (kernfs_fop_write+0x150/0x1b4)
[ 68.981217] r4:eebc1300[ 68.983573] r3:c0240140
[ 68.986104]
[ 68.987601] [<c023f658>] (kernfs_fop_write) from [<c01e2124>] (__vfs_write+0x34/0x110)
[ 68.995513] r10:00000000[ 68.997956] r8:00022900
r7:00000002[ 69.001540] r6:ef1f1f80
r5:c023f658[ 69.005123] r4:eebd8180
[ 69.007660] [<c01e20f0>] (__vfs_write) from [<c01e238c>] (vfs_write+0xc4/0x150)
[ 69.014964] r8:ef1f1f80[ 69.017320] r7:00022900
r6:00000002[ 69.020903] r5:00000000
r4:eebd8180[ 69.024485]
[ 69.025981] [<c01e22c8>] (vfs_write) from [<c01e24e4>] (SyS_write+0x48/0x84)
[ 69.033025] r10:00000000[ 69.035467] r8:c0107104
r7:00022900[ 69.039051] r6:00000002
r5:eebd8180[ 69.042634] r4:eebd8180
[ 69.045175] [<c01e249c>] (SyS_write) from [<c0106f40>] (ret_fast_syscall+0x0/0x3c)
[ 69.052740] r7:00000004[ 69.055096] r6:000217bc
r5:00000002[ 69.058679] r4:00022900
[ 69.061209]
[ 69.062704] Code: e1520001 0a000005 e5931048 e5930044 (e5801004)
[ 69.068853] ---[ end trace 2d55ad213b142959 ]---
Segmentation fault
^ permalink raw reply
* [PATCH v2 3/3] dt-bindings: i2c: pxa: Update the documentation for the Armada 3700
From: Romain Perier @ 2016-11-09 8:14 UTC (permalink / raw)
To: Wolfram Sang, linux-i2c-u79uwXL29TY76Z2rM5mHXA
Cc: devicetree-u79uwXL29TY76Z2rM5mHXA, Rob Herring, Ian Campbell,
Pawel Moll, Mark Rutland, Kumar Gala, Jason Cooper, Andrew Lunn,
Sebastian Hesselbarth, Gregory Clement,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
Thomas Petazzoni, Nadav Haklai, Omri Itach, Shadi Ammouri,
Yahuda Yitschak, Hanna Hawa, Neta Zur Hershkovits, Igal Liberman,
Marcin Wojtas <mw>
In-Reply-To: <20161109081431.10115-1-romain.perier-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
This commit documents the compatible string to have the compatibility for
the I2C unit found in the Armada 3700.
Signed-off-by: Romain Perier <romain.perier-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
---
Changes in v2:
- Fixed wrong compatible string, it should be "marvell,armada-3700-i2c"
and not "marvell,armada-3700".
Documentation/devicetree/bindings/i2c/i2c-pxa.txt | 1 +
1 file changed, 1 insertion(+)
diff --git a/Documentation/devicetree/bindings/i2c/i2c-pxa.txt b/Documentation/devicetree/bindings/i2c/i2c-pxa.txt
index 12b78ac..d30f0b1 100644
--- a/Documentation/devicetree/bindings/i2c/i2c-pxa.txt
+++ b/Documentation/devicetree/bindings/i2c/i2c-pxa.txt
@@ -7,6 +7,7 @@ Required properties :
compatible processor, e.g. pxa168, pxa910, mmp2, mmp3.
For the pxa2xx/pxa3xx, an additional node "mrvl,pxa-i2c" is required
as shown in the example below.
+ For the Armada 3700, the compatible should be "marvell,armada-3700-i2c".
Recommended properties :
--
2.9.3
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related
* [PATCH v2 2/3] arm64: dts: marvell: Add I2C definitions for the Armada 3700
From: Romain Perier @ 2016-11-09 8:14 UTC (permalink / raw)
To: Wolfram Sang, linux-i2c-u79uwXL29TY76Z2rM5mHXA
Cc: devicetree-u79uwXL29TY76Z2rM5mHXA, Rob Herring, Ian Campbell,
Pawel Moll, Mark Rutland, Kumar Gala, Jason Cooper, Andrew Lunn,
Sebastian Hesselbarth, Gregory Clement,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
Thomas Petazzoni, Nadav Haklai, Omri Itach, Shadi Ammouri,
Yahuda Yitschak, Hanna Hawa, Neta Zur Hershkovits, Igal Liberman,
Marcin Wojtas <mw>
In-Reply-To: <20161109081431.10115-1-romain.perier-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
The Armada 3700 has two i2c bus interface units, this commit adds the
definitions of the corresponding device nodes. It also enables the node
on the development board for this SoC.
Signed-off-by: Romain Perier <romain.perier-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
Acked-by: Gregory CLEMENT <gregory.clement-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
---
arch/arm64/boot/dts/marvell/armada-3720-db.dts | 4 ++++
arch/arm64/boot/dts/marvell/armada-37xx.dtsi | 18 ++++++++++++++++++
2 files changed, 22 insertions(+)
diff --git a/arch/arm64/boot/dts/marvell/armada-3720-db.dts b/arch/arm64/boot/dts/marvell/armada-3720-db.dts
index 1372e9a6..16d84af 100644
--- a/arch/arm64/boot/dts/marvell/armada-3720-db.dts
+++ b/arch/arm64/boot/dts/marvell/armada-3720-db.dts
@@ -62,6 +62,10 @@
};
};
+&i2c0 {
+ status = "okay";
+};
+
/* CON3 */
&sata {
status = "okay";
diff --git a/arch/arm64/boot/dts/marvell/armada-37xx.dtsi b/arch/arm64/boot/dts/marvell/armada-37xx.dtsi
index c476253..bf2d73d 100644
--- a/arch/arm64/boot/dts/marvell/armada-37xx.dtsi
+++ b/arch/arm64/boot/dts/marvell/armada-37xx.dtsi
@@ -98,6 +98,24 @@
/* 32M internal register @ 0xd000_0000 */
ranges = <0x0 0x0 0xd0000000 0x2000000>;
+ i2c0: i2c@11000 {
+ compatible = "marvell,armada-3700-i2c";
+ reg = <0x11000 0x24>;
+ clocks = <&nb_perih_clk 10>;
+ interrupts = <GIC_SPI 1 IRQ_TYPE_LEVEL_HIGH>;
+ mrvl,i2c-fast-mode;
+ status = "disabled";
+ };
+
+ i2c1: i2c@11080 {
+ compatible = "marvell,armada-3700-i2c";
+ reg = <0x11080 0x24>;
+ clocks = <&nb_perih_clk 9>;
+ interrupts = <GIC_SPI 2 IRQ_TYPE_LEVEL_HIGH>;
+ mrvl,i2c-fast-mode;
+ status = "disabled";
+ };
+
uart0: serial@12000 {
compatible = "marvell,armada-3700-uart";
reg = <0x12000 0x400>;
--
2.9.3
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related
* [PATCH v2 1/3] i2c: pxa: Add support for the I2C units found in Armada 3700
From: Romain Perier @ 2016-11-09 8:14 UTC (permalink / raw)
To: Wolfram Sang, linux-i2c-u79uwXL29TY76Z2rM5mHXA
Cc: devicetree-u79uwXL29TY76Z2rM5mHXA, Rob Herring, Ian Campbell,
Pawel Moll, Mark Rutland, Kumar Gala, Jason Cooper, Andrew Lunn,
Sebastian Hesselbarth, Gregory Clement,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
Thomas Petazzoni, Nadav Haklai, Omri Itach, Shadi Ammouri,
Yahuda Yitschak, Hanna Hawa, Neta Zur Hershkovits, Igal Liberman,
Marcin Wojtas <mw>
In-Reply-To: <20161109081431.10115-1-romain.perier-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
The Armada 3700 has two I2C controllers that is compliant with the I2C
Bus Specificiation 2.1, supports multi-master and different bus speed:
Standard mode (up to 100 KHz), Fast mode (up to 400 KHz),
High speed mode (up to 3.4 Mhz).
This IP block has a lot of similarity with the PXA, except some register
offsets and bitfield. This commits adds a basic support for this I2C
unit.
Signed-off-by: Romain Perier <romain.perier-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
Tested-by: Gregory CLEMENT <gregory.clement-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
---
drivers/i2c/busses/Kconfig | 2 +-
drivers/i2c/busses/i2c-pxa.c | 25 +++++++++++++++++++++++--
2 files changed, 24 insertions(+), 3 deletions(-)
diff --git a/drivers/i2c/busses/Kconfig b/drivers/i2c/busses/Kconfig
index d252276..2f56a26 100644
--- a/drivers/i2c/busses/Kconfig
+++ b/drivers/i2c/busses/Kconfig
@@ -763,7 +763,7 @@ config I2C_PUV3
config I2C_PXA
tristate "Intel PXA2XX I2C adapter"
- depends on ARCH_PXA || ARCH_MMP || (X86_32 && PCI && OF)
+ depends on ARCH_PXA || ARCH_MMP || ARCH_MVEBU || (X86_32 && PCI && OF)
help
If you have devices in the PXA I2C bus, say yes to this option.
This driver can also be built as a module. If so, the module
diff --git a/drivers/i2c/busses/i2c-pxa.c b/drivers/i2c/busses/i2c-pxa.c
index e28b825..34ea830 100644
--- a/drivers/i2c/busses/i2c-pxa.c
+++ b/drivers/i2c/busses/i2c-pxa.c
@@ -55,6 +55,7 @@ enum pxa_i2c_types {
REGS_PXA3XX,
REGS_CE4100,
REGS_PXA910,
+ REGS_A3700,
};
/*
@@ -91,6 +92,13 @@ static struct pxa_reg_layout pxa_reg_layout[] = {
.ilcr = 0x28,
.iwcr = 0x30,
},
+ [REGS_A3700] = {
+ .ibmr = 0x00,
+ .idbr = 0x04,
+ .icr = 0x08,
+ .isr = 0x0c,
+ .isar = 0x10,
+ },
};
static const struct platform_device_id i2c_pxa_id_table[] = {
@@ -98,6 +106,7 @@ static const struct platform_device_id i2c_pxa_id_table[] = {
{ "pxa3xx-pwri2c", REGS_PXA3XX },
{ "ce4100-i2c", REGS_CE4100 },
{ "pxa910-i2c", REGS_PXA910 },
+ { "armada-3700-i2c", REGS_A3700 },
{ },
};
MODULE_DEVICE_TABLE(platform, i2c_pxa_id_table);
@@ -122,7 +131,9 @@ MODULE_DEVICE_TABLE(platform, i2c_pxa_id_table);
#define ICR_SADIE (1 << 13) /* slave address detected int enable */
#define ICR_UR (1 << 14) /* unit reset */
#define ICR_FM (1 << 15) /* fast mode */
+#define ICR_BUSMODE_FM (1 << 16) /* shifted fast mode for armada-3700 */
#define ICR_HS (1 << 16) /* High Speed mode */
+#define ICR_BUSMODE_HS (1 << 17) /* shifted high speed mode for armada-3700 */
#define ICR_GPIOEN (1 << 19) /* enable GPIO mode for SCL in HS */
#define ISR_RWM (1 << 0) /* read/write mode */
@@ -193,6 +204,8 @@ struct pxa_i2c {
unsigned char master_code;
unsigned long rate;
bool highmode_enter;
+ unsigned long fm_mask;
+ unsigned long hs_mask;
};
#define _IBMR(i2c) ((i2c)->reg_ibmr)
@@ -503,8 +516,8 @@ static void i2c_pxa_reset(struct pxa_i2c *i2c)
writel(i2c->slave_addr, _ISAR(i2c));
/* set control register values */
- writel(I2C_ICR_INIT | (i2c->fast_mode ? ICR_FM : 0), _ICR(i2c));
- writel(readl(_ICR(i2c)) | (i2c->high_mode ? ICR_HS : 0), _ICR(i2c));
+ writel(I2C_ICR_INIT | (i2c->fast_mode ? i2c->fm_mask : 0), _ICR(i2c));
+ writel(readl(_ICR(i2c)) | (i2c->high_mode ? i2c->hs_mask : 0), _ICR(i2c));
#ifdef CONFIG_I2C_PXA_SLAVE
dev_info(&i2c->adap.dev, "Enabling slave mode\n");
@@ -1137,6 +1150,7 @@ static const struct of_device_id i2c_pxa_dt_ids[] = {
{ .compatible = "mrvl,pxa-i2c", .data = (void *)REGS_PXA2XX },
{ .compatible = "mrvl,pwri2c", .data = (void *)REGS_PXA3XX },
{ .compatible = "mrvl,mmp-twsi", .data = (void *)REGS_PXA910 },
+ { .compatible = "marvell,armada-3700-i2c", .data = (void *)REGS_A3700 },
{}
};
MODULE_DEVICE_TABLE(of, i2c_pxa_dt_ids);
@@ -1158,6 +1172,13 @@ static int i2c_pxa_probe_dt(struct platform_device *pdev, struct pxa_i2c *i2c,
i2c->use_pio = 1;
if (of_get_property(np, "mrvl,i2c-fast-mode", NULL))
i2c->fast_mode = 1;
+ if (of_device_is_compatible(np, "marvell,armada-3700-i2c")) {
+ i2c->fm_mask = ICR_BUSMODE_FM;
+ i2c->hs_mask = ICR_BUSMODE_HS;
+ } else {
+ i2c->fm_mask = ICR_FM;
+ i2c->hs_mask = ICR_HS;
+ }
*i2c_types = (enum pxa_i2c_types)(of_id->data);
--
2.9.3
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related
* [PATCH v2 0/3] Add basic support for the I2C units of the Armada 3700
From: Romain Perier @ 2016-11-09 8:14 UTC (permalink / raw)
To: Wolfram Sang, linux-i2c-u79uwXL29TY76Z2rM5mHXA
Cc: devicetree-u79uwXL29TY76Z2rM5mHXA, Rob Herring, Ian Campbell,
Pawel Moll, Mark Rutland, Kumar Gala, Jason Cooper, Andrew Lunn,
Sebastian Hesselbarth, Gregory Clement,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
Thomas Petazzoni, Nadav Haklai, Omri Itach, Shadi Ammouri,
Yahuda Yitschak, Hanna Hawa, Neta Zur Hershkovits, Igal Liberman,
Marcin Wojtas <mw>
This series add basic support for the I2C bus interface units present
in the Armada 3700 to the pxa-i2c driver. It also add the definitions of
the device nodes to the devicetree at the SoC level and for its official
development board: the Armada 3720 DB.
Romain Perier (3):
i2c: pxa: Add support for the I2C units found in Armada 3700
arm64: dts: marvell: Add I2C definitions for the Armada 3700
dt-bindings: i2c: pxa: Update the documentation for the Armada 3700
Documentation/devicetree/bindings/i2c/i2c-pxa.txt | 1 +
arch/arm64/boot/dts/marvell/armada-3720-db.dts | 4 ++++
arch/arm64/boot/dts/marvell/armada-37xx.dtsi | 18 ++++++++++++++++
drivers/i2c/busses/Kconfig | 2 +-
drivers/i2c/busses/i2c-pxa.c | 25 +++++++++++++++++++++--
5 files changed, 47 insertions(+), 3 deletions(-)
--
2.9.3
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply
* [v16, 7/7] mmc: sdhci-of-esdhc: fix host version for T4240-R1.0-R2.0
From: Yangbo Lu @ 2016-11-09 3:14 UTC (permalink / raw)
To: linux-mmc-u79uwXL29TY76Z2rM5mHXA,
ulf.hansson-QSEj5FYQhm4dnm+yROfE0A, Scott Wood, Arnd Bergmann
Cc: Mark Rutland, Greg Kroah-Hartman, Xiaobo Xie, Minghuan Lian,
linux-i2c-u79uwXL29TY76Z2rM5mHXA,
linux-clk-u79uwXL29TY76Z2rM5mHXA, Qiang Zhao, Russell King,
Bhupesh Sharma, Jochen Friedrich, Claudiu Manoil,
devicetree-u79uwXL29TY76Z2rM5mHXA, Kumar Gala, Rob Herring,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
netdev-u79uwXL29TY76Z2rM5mHXA,
linux-kernel-u79uwXL29TY76Z2rM5mHXA, Leo Li,
iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA, Yangbo Lu,
linuxppc-dev-uLR06cmDAlY/bJ5BZ2RsiQ
In-Reply-To: <1478661252-42439-1-git-send-email-yangbo.lu-3arQi8VN3Tc@public.gmane.org>
The eSDHC of T4240-R1.0-R2.0 has incorrect vender version and spec version.
Acturally the right version numbers should be VVN=0x13 and SVN = 0x1.
This patch adds the GUTS driver support for eSDHC driver to match SoC.
And fix host version to avoid that incorrect version numbers break down
the ADMA data transfer.
Signed-off-by: Yangbo Lu <yangbo.lu-3arQi8VN3Tc@public.gmane.org>
Acked-by: Ulf Hansson <ulf.hansson-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
Acked-by: Scott Wood <oss-fOR+EgIDQEHk1uMJSBkQmQ@public.gmane.org>
Acked-by: Arnd Bergmann <arnd-r2nGTMty4D4@public.gmane.org>
---
Changes for v2:
- Got SVR through iomap instead of dts
Changes for v3:
- Managed GUTS through syscon instead of iomap in eSDHC driver
Changes for v4:
- Got SVR by GUTS driver instead of SYSCON
Changes for v5:
- Changed to get SVR through API fsl_guts_get_svr()
- Combined patch 4, patch 5 and patch 6 into one
Changes for v6:
- Added 'Acked-by: Ulf Hansson'
Changes for v7:
- None
Changes for v8:
- Added 'Acked-by: Scott Wood'
Changes for v9:
- None
Changes for v10:
- None
Changes for v11:
- Changed to use soc_device_match
Changes for v12:
- Matched soc through .family field instead of .soc_id
Changes for v13:
- None
Changes for v14:
- None
Changes for v15:
- None
Changes for v16:
- Added 'Acked-by: Arnd'
---
drivers/mmc/host/Kconfig | 1 +
drivers/mmc/host/sdhci-of-esdhc.c | 20 ++++++++++++++++++++
2 files changed, 21 insertions(+)
diff --git a/drivers/mmc/host/Kconfig b/drivers/mmc/host/Kconfig
index 5cf7eba..4128a3c 100644
--- a/drivers/mmc/host/Kconfig
+++ b/drivers/mmc/host/Kconfig
@@ -144,6 +144,7 @@ config MMC_SDHCI_OF_ESDHC
depends on MMC_SDHCI_PLTFM
depends on PPC || ARCH_MXC || ARCH_LAYERSCAPE
select MMC_SDHCI_IO_ACCESSORS
+ select FSL_GUTS
help
This selects the Freescale eSDHC controller support.
diff --git a/drivers/mmc/host/sdhci-of-esdhc.c b/drivers/mmc/host/sdhci-of-esdhc.c
index fb71c86..57bdb9e 100644
--- a/drivers/mmc/host/sdhci-of-esdhc.c
+++ b/drivers/mmc/host/sdhci-of-esdhc.c
@@ -18,6 +18,7 @@
#include <linux/of.h>
#include <linux/delay.h>
#include <linux/module.h>
+#include <linux/sys_soc.h>
#include <linux/mmc/host.h>
#include "sdhci-pltfm.h"
#include "sdhci-esdhc.h"
@@ -28,6 +29,7 @@
struct sdhci_esdhc {
u8 vendor_ver;
u8 spec_ver;
+ bool quirk_incorrect_hostver;
};
/**
@@ -73,6 +75,8 @@ static u32 esdhc_readl_fixup(struct sdhci_host *host,
static u16 esdhc_readw_fixup(struct sdhci_host *host,
int spec_reg, u32 value)
{
+ struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host);
+ struct sdhci_esdhc *esdhc = sdhci_pltfm_priv(pltfm_host);
u16 ret;
int shift = (spec_reg & 0x2) * 8;
@@ -80,6 +84,12 @@ static u16 esdhc_readw_fixup(struct sdhci_host *host,
ret = value & 0xffff;
else
ret = (value >> shift) & 0xffff;
+ /* Workaround for T4240-R1.0-R2.0 eSDHC which has incorrect
+ * vendor version and spec version information.
+ */
+ if ((spec_reg == SDHCI_HOST_VERSION) &&
+ (esdhc->quirk_incorrect_hostver))
+ ret = (VENDOR_V_23 << SDHCI_VENDOR_VER_SHIFT) | SDHCI_SPEC_200;
return ret;
}
@@ -558,6 +568,12 @@ static const struct sdhci_pltfm_data sdhci_esdhc_le_pdata = {
.ops = &sdhci_esdhc_le_ops,
};
+static struct soc_device_attribute soc_incorrect_hostver[] = {
+ { .family = "QorIQ T4240", .revision = "1.0", },
+ { .family = "QorIQ T4240", .revision = "2.0", },
+ { },
+};
+
static void esdhc_init(struct platform_device *pdev, struct sdhci_host *host)
{
struct sdhci_pltfm_host *pltfm_host;
@@ -571,6 +587,10 @@ static void esdhc_init(struct platform_device *pdev, struct sdhci_host *host)
esdhc->vendor_ver = (host_ver & SDHCI_VENDOR_VER_MASK) >>
SDHCI_VENDOR_VER_SHIFT;
esdhc->spec_ver = host_ver & SDHCI_SPEC_VER_MASK;
+ if (soc_device_match(soc_incorrect_hostver))
+ esdhc->quirk_incorrect_hostver = true;
+ else
+ esdhc->quirk_incorrect_hostver = false;
}
static int sdhci_esdhc_probe(struct platform_device *pdev)
--
2.1.0.27.g96db324
^ permalink raw reply related
* [v16, 6/7] base: soc: Check for NULL SoC device attributes
From: Yangbo Lu @ 2016-11-09 3:14 UTC (permalink / raw)
To: linux-mmc-u79uwXL29TY76Z2rM5mHXA,
ulf.hansson-QSEj5FYQhm4dnm+yROfE0A, Scott Wood, Arnd Bergmann
Cc: Mark Rutland, Geert Uytterhoeven, Greg Kroah-Hartman, Xiaobo Xie,
Minghuan Lian, linux-i2c-u79uwXL29TY76Z2rM5mHXA,
linux-clk-u79uwXL29TY76Z2rM5mHXA, Qiang Zhao, Russell King,
Bhupesh Sharma, Jochen Friedrich, Claudiu Manoil,
devicetree-u79uwXL29TY76Z2rM5mHXA, Rob Herring,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
netdev-u79uwXL29TY76Z2rM5mHXA,
linux-kernel-u79uwXL29TY76Z2rM5mHXA, Leo Li,
iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA, Kumar Gala,
linuxppc-dev-uLR06cmDAlY/bJ5BZ2RsiQ
In-Reply-To: <1478661252-42439-1-git-send-email-yangbo.lu-3arQi8VN3Tc@public.gmane.org>
From: Geert Uytterhoeven <geert+renesas-gXvu3+zWzMSzQB+pC5nmwQ@public.gmane.org>
If soc_device_match() is used to check the value of a specific
attribute that is not present for the current SoC, the kernel crashes
with a NULL pointer dereference.
Fix this by explicitly checking for the absence of a needed property,
and considering this a non-match.
Signed-off-by: Geert Uytterhoeven <geert+renesas-gXvu3+zWzMSzQB+pC5nmwQ@public.gmane.org>
Acked-by: Arnd Bergmann <arnd-r2nGTMty4D4@public.gmane.org>
---
Changes for v16:
- Added this patch
---
drivers/base/soc.c | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/drivers/base/soc.c b/drivers/base/soc.c
index 0c5cf87..0e701e2 100644
--- a/drivers/base/soc.c
+++ b/drivers/base/soc.c
@@ -167,19 +167,23 @@ static int soc_device_match_one(struct device *dev, void *arg)
const struct soc_device_attribute *match = arg;
if (match->machine &&
- !glob_match(match->machine, soc_dev->attr->machine))
+ (!soc_dev->attr->machine ||
+ !glob_match(match->machine, soc_dev->attr->machine)))
return 0;
if (match->family &&
- !glob_match(match->family, soc_dev->attr->family))
+ (!soc_dev->attr->family ||
+ !glob_match(match->family, soc_dev->attr->family)))
return 0;
if (match->revision &&
- !glob_match(match->revision, soc_dev->attr->revision))
+ (!soc_dev->attr->revision ||
+ !glob_match(match->revision, soc_dev->attr->revision)))
return 0;
if (match->soc_id &&
- !glob_match(match->soc_id, soc_dev->attr->soc_id))
+ (!soc_dev->attr->soc_id ||
+ !glob_match(match->soc_id, soc_dev->attr->soc_id)))
return 0;
return 1;
--
2.1.0.27.g96db324
^ permalink raw reply related
* [v16, 5/7] base: soc: introduce soc_device_match() interface
From: Yangbo Lu @ 2016-11-09 3:14 UTC (permalink / raw)
To: linux-mmc-u79uwXL29TY76Z2rM5mHXA,
ulf.hansson-QSEj5FYQhm4dnm+yROfE0A, Scott Wood, Arnd Bergmann
Cc: Mark Rutland, Greg Kroah-Hartman, Xiaobo Xie, Minghuan Lian,
linux-i2c-u79uwXL29TY76Z2rM5mHXA,
linux-clk-u79uwXL29TY76Z2rM5mHXA, Qiang Zhao, Russell King,
Bhupesh Sharma, Jochen Friedrich, Claudiu Manoil,
devicetree-u79uwXL29TY76Z2rM5mHXA, Kumar Gala, Rob Herring,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
netdev-u79uwXL29TY76Z2rM5mHXA,
linux-kernel-u79uwXL29TY76Z2rM5mHXA, Leo Li,
iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA, Yangbo Lu,
linuxppc-dev-uLR06cmDAlY/bJ5BZ2RsiQ
In-Reply-To: <1478661252-42439-1-git-send-email-yangbo.lu-3arQi8VN3Tc@public.gmane.org>
From: Arnd Bergmann <arnd-r2nGTMty4D4@public.gmane.org>
We keep running into cases where device drivers want to know the exact
version of the a SoC they are currently running on. In the past, this has
usually been done through a vendor specific API that can be called by a
driver, or by directly accessing some kind of version register that is
not part of the device itself but that belongs to a global register area
of the chip.
Common reasons for doing this include:
- A machine is not using devicetree or similar for passing data about
on-chip devices, but just announces their presence using boot-time
platform devices, and the machine code itself does not care about the
revision.
- There is existing firmware or boot loaders with existing DT binaries
with generic compatible strings that do not identify the particular
revision of each device, but the driver knows which SoC revisions
include which part.
- A prerelease version of a chip has some quirks and we are using the same
version of the bootloader and the DT blob on both the prerelease and the
final version. An update of the DT binding seems inappropriate because
that would involve maintaining multiple copies of the dts and/or
bootloader.
This patch introduces the soc_device_match() interface that is meant to
work like of_match_node() but instead of identifying the version of a
device, it identifies the SoC itself using a vendor-agnostic interface.
Unlike of_match_node(), we do not do an exact string compare but instead
use glob_match() to allow wildcards in strings.
Signed-off-by: Arnd Bergmann <arnd-r2nGTMty4D4@public.gmane.org>
Signed-off-by: Yangbo Lu <yangbo.lu-3arQi8VN3Tc@public.gmane.org>
Acked-by: Greg Kroah-Hartman <gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org>
---
Changes for v11:
- Added this patch for soc match
Changes for v12:
- Corrected the author
- Rewrited soc_device_match with while loop
Changes for v13:
- Added ack from Greg
Changes for v14:
- None
Changes for v15:
- None
Changes for v16:
- None
---
drivers/base/Kconfig | 1 +
drivers/base/soc.c | 66 +++++++++++++++++++++++++++++++++++++++++++++++++
include/linux/sys_soc.h | 3 +++
3 files changed, 70 insertions(+)
diff --git a/drivers/base/Kconfig b/drivers/base/Kconfig
index d02e7c0..2abea87 100644
--- a/drivers/base/Kconfig
+++ b/drivers/base/Kconfig
@@ -237,6 +237,7 @@ config GENERIC_CPU_AUTOPROBE
config SOC_BUS
bool
+ select GLOB
source "drivers/base/regmap/Kconfig"
diff --git a/drivers/base/soc.c b/drivers/base/soc.c
index b63f23e..0c5cf87 100644
--- a/drivers/base/soc.c
+++ b/drivers/base/soc.c
@@ -13,6 +13,7 @@
#include <linux/spinlock.h>
#include <linux/sys_soc.h>
#include <linux/err.h>
+#include <linux/glob.h>
static DEFINE_IDA(soc_ida);
@@ -159,3 +160,68 @@ static int __init soc_bus_register(void)
return bus_register(&soc_bus_type);
}
core_initcall(soc_bus_register);
+
+static int soc_device_match_one(struct device *dev, void *arg)
+{
+ struct soc_device *soc_dev = container_of(dev, struct soc_device, dev);
+ const struct soc_device_attribute *match = arg;
+
+ if (match->machine &&
+ !glob_match(match->machine, soc_dev->attr->machine))
+ return 0;
+
+ if (match->family &&
+ !glob_match(match->family, soc_dev->attr->family))
+ return 0;
+
+ if (match->revision &&
+ !glob_match(match->revision, soc_dev->attr->revision))
+ return 0;
+
+ if (match->soc_id &&
+ !glob_match(match->soc_id, soc_dev->attr->soc_id))
+ return 0;
+
+ return 1;
+}
+
+/*
+ * soc_device_match - identify the SoC in the machine
+ * @matches: zero-terminated array of possible matches
+ *
+ * returns the first matching entry of the argument array, or NULL
+ * if none of them match.
+ *
+ * This function is meant as a helper in place of of_match_node()
+ * in cases where either no device tree is available or the information
+ * in a device node is insufficient to identify a particular variant
+ * by its compatible strings or other properties. For new devices,
+ * the DT binding should always provide unique compatible strings
+ * that allow the use of of_match_node() instead.
+ *
+ * The calling function can use the .data entry of the
+ * soc_device_attribute to pass a structure or function pointer for
+ * each entry.
+ */
+const struct soc_device_attribute *soc_device_match(
+ const struct soc_device_attribute *matches)
+{
+ int ret = 0;
+
+ if (!matches)
+ return NULL;
+
+ while (!ret) {
+ if (!(matches->machine || matches->family ||
+ matches->revision || matches->soc_id))
+ break;
+ ret = bus_for_each_dev(&soc_bus_type, NULL, (void *)matches,
+ soc_device_match_one);
+ if (!ret)
+ matches++;
+ else
+ return matches;
+ }
+ return NULL;
+}
+EXPORT_SYMBOL_GPL(soc_device_match);
diff --git a/include/linux/sys_soc.h b/include/linux/sys_soc.h
index 2739ccb..9f5eb06 100644
--- a/include/linux/sys_soc.h
+++ b/include/linux/sys_soc.h
@@ -13,6 +13,7 @@ struct soc_device_attribute {
const char *family;
const char *revision;
const char *soc_id;
+ const void *data;
};
/**
@@ -34,4 +35,6 @@ void soc_device_unregister(struct soc_device *soc_dev);
*/
struct device *soc_device_to_device(struct soc_device *soc);
+const struct soc_device_attribute *soc_device_match(
+ const struct soc_device_attribute *matches);
#endif /* __SOC_BUS_H */
--
2.1.0.27.g96db324
^ permalink raw reply related
* [v16, 4/7] MAINTAINERS: add entry for Freescale SoC drivers
From: Yangbo Lu @ 2016-11-09 3:14 UTC (permalink / raw)
To: linux-mmc-u79uwXL29TY76Z2rM5mHXA,
ulf.hansson-QSEj5FYQhm4dnm+yROfE0A, Scott Wood, Arnd Bergmann
Cc: Mark Rutland, Greg Kroah-Hartman, Xiaobo Xie, Minghuan Lian,
linux-i2c-u79uwXL29TY76Z2rM5mHXA,
linux-clk-u79uwXL29TY76Z2rM5mHXA, Qiang Zhao, Russell King,
Bhupesh Sharma, Jochen Friedrich, Claudiu Manoil,
devicetree-u79uwXL29TY76Z2rM5mHXA, Kumar Gala, Rob Herring,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
netdev-u79uwXL29TY76Z2rM5mHXA,
linux-kernel-u79uwXL29TY76Z2rM5mHXA, Leo Li,
iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA, Yangbo Lu,
linuxppc-dev-uLR06cmDAlY/bJ5BZ2RsiQ
In-Reply-To: <1478661252-42439-1-git-send-email-yangbo.lu-3arQi8VN3Tc@public.gmane.org>
Add maintainer entry for Freescale SoC drivers including
the QE library and the GUTS driver now. Also add maintainer
for QE library.
Signed-off-by: Yangbo Lu <yangbo.lu-3arQi8VN3Tc@public.gmane.org>
Acked-by: Scott Wood <oss-fOR+EgIDQEHk1uMJSBkQmQ@public.gmane.org>
Acked-by: Qiang Zhao <qiang.zhao-3arQi8VN3Tc@public.gmane.org>
Acked-by: Arnd Bergmann <arnd-r2nGTMty4D4@public.gmane.org>
---
Changes for v8:
- Added this patch
Changes for v9:
- Added linux-arm mail list
- Removed GUTS driver entry
Changes for v10:
- Changed 'DRIVER' to 'DRIVERS'
- Added 'Acked-by' of Scott and Qiang
Changes for v11:
- None
Changes for v12:
- None
Changes for v13:
- None
Changes for v14:
- None
Changes for v15:
- None
Changes for v16:
- Added 'Acked-by: Arnd'
---
MAINTAINERS | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/MAINTAINERS b/MAINTAINERS
index 9be761f..e1a8835 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -5045,9 +5045,18 @@ S: Maintained
F: drivers/net/ethernet/freescale/fman
F: Documentation/devicetree/bindings/powerpc/fsl/fman.txt
+FREESCALE SOC DRIVERS
+M: Scott Wood <oss-fOR+EgIDQEHk1uMJSBkQmQ@public.gmane.org>
+L: linuxppc-dev-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org
+L: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
+S: Maintained
+F: drivers/soc/fsl/
+F: include/linux/fsl/
+
FREESCALE QUICC ENGINE LIBRARY
+M: Qiang Zhao <qiang.zhao-3arQi8VN3Tc@public.gmane.org>
L: linuxppc-dev-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org
-S: Orphan
+S: Maintained
F: drivers/soc/fsl/qe/
F: include/soc/fsl/*qe*.h
F: include/soc/fsl/*ucc*.h
--
2.1.0.27.g96db324
^ permalink raw reply related
* [v16, 3/7] soc: fsl: add GUTS driver for QorIQ platforms
From: Yangbo Lu @ 2016-11-09 3:14 UTC (permalink / raw)
To: linux-mmc-u79uwXL29TY76Z2rM5mHXA,
ulf.hansson-QSEj5FYQhm4dnm+yROfE0A, Scott Wood, Arnd Bergmann
Cc: Mark Rutland, Greg Kroah-Hartman, Xiaobo Xie, Minghuan Lian,
linux-i2c-u79uwXL29TY76Z2rM5mHXA,
linux-clk-u79uwXL29TY76Z2rM5mHXA, Qiang Zhao, Russell King,
Bhupesh Sharma, Jochen Friedrich, Claudiu Manoil,
devicetree-u79uwXL29TY76Z2rM5mHXA, Kumar Gala, Rob Herring,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
netdev-u79uwXL29TY76Z2rM5mHXA,
linux-kernel-u79uwXL29TY76Z2rM5mHXA, Leo Li,
iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA, Yangbo Lu,
linuxppc-dev-uLR06cmDAlY/bJ5BZ2RsiQ
In-Reply-To: <1478661252-42439-1-git-send-email-yangbo.lu-3arQi8VN3Tc@public.gmane.org>
The global utilities block controls power management, I/O device
enabling, power-onreset(POR) configuration monitoring, alternate
function selection for multiplexed signals,and clock control.
This patch adds a driver to manage and access global utilities block.
Initially only reading SVR and registering soc device are supported.
Other guts accesses, such as reading RCW, should eventually be moved
into this driver as well.
Signed-off-by: Yangbo Lu <yangbo.lu-3arQi8VN3Tc@public.gmane.org>
Acked-by: Arnd Bergmann <arnd-r2nGTMty4D4@public.gmane.org>
---
Changes for v4:
- Added this patch
Changes for v5:
- Modified copyright info
- Changed MODULE_LICENSE to GPL
- Changed EXPORT_SYMBOL_GPL to EXPORT_SYMBOL
- Made FSL_GUTS user-invisible
- Added a complete compatible list for GUTS
- Stored guts info in file-scope variable
- Added mfspr() getting SVR
- Redefined GUTS APIs
- Called fsl_guts_init rather than using platform driver
- Removed useless parentheses
- Removed useless 'extern' key words
Changes for v6:
- Made guts thread safe in fsl_guts_init
Changes for v7:
- Removed 'ifdef' for function declaration in guts.h
Changes for v8:
- Fixes lines longer than 80 characters checkpatch issue
- Added 'Acked-by: Scott Wood'
Changes for v9:
- None
Changes for v10:
- None
Changes for v11:
- Changed to platform driver
Changes for v12:
- Removed "signed-off-by: Scott"
- Defined fsl_soc_die_attr struct array instead of
soc_device_attribute
- Re-designed soc_device_attribute for QorIQ SoC
- Other minor fixes
Changes for v13:
- Rebased
- Removed text after 'bool' in Kconfig
- Removed ARCH ifdefs
- Added more bits for ls1021a mask
- Used devm
Changes for v14:
- Used devm_ioremap_resource
Changes for v15:
- Fixed error code for devm_ioremap_resource
Changes for v16:
- Removed header file svr.h and calculated REV_MAJ/MIN in this driver
- Added 'Acked-by: Arnd'
---
drivers/soc/Kconfig | 3 +-
drivers/soc/fsl/Kconfig | 18 ++++
drivers/soc/fsl/Makefile | 1 +
drivers/soc/fsl/guts.c | 236 +++++++++++++++++++++++++++++++++++++++++++++++
include/linux/fsl/guts.h | 125 +++++++++++++++----------
5 files changed, 333 insertions(+), 50 deletions(-)
create mode 100644 drivers/soc/fsl/Kconfig
create mode 100644 drivers/soc/fsl/guts.c
diff --git a/drivers/soc/Kconfig b/drivers/soc/Kconfig
index e6e90e8..f31bceb 100644
--- a/drivers/soc/Kconfig
+++ b/drivers/soc/Kconfig
@@ -1,8 +1,7 @@
menu "SOC (System On Chip) specific Drivers"
source "drivers/soc/bcm/Kconfig"
-source "drivers/soc/fsl/qbman/Kconfig"
-source "drivers/soc/fsl/qe/Kconfig"
+source "drivers/soc/fsl/Kconfig"
source "drivers/soc/mediatek/Kconfig"
source "drivers/soc/qcom/Kconfig"
source "drivers/soc/rockchip/Kconfig"
diff --git a/drivers/soc/fsl/Kconfig b/drivers/soc/fsl/Kconfig
new file mode 100644
index 0000000..7a9fb9b
--- /dev/null
+++ b/drivers/soc/fsl/Kconfig
@@ -0,0 +1,18 @@
+#
+# Freescale SOC drivers
+#
+
+source "drivers/soc/fsl/qbman/Kconfig"
+source "drivers/soc/fsl/qe/Kconfig"
+
+config FSL_GUTS
+ bool
+ select SOC_BUS
+ help
+ The global utilities block controls power management, I/O device
+ enabling, power-onreset(POR) configuration monitoring, alternate
+ function selection for multiplexed signals,and clock control.
+ This driver is to manage and access global utilities block.
+ Initially only reading SVR and registering soc device are supported.
+ Other guts accesses, such as reading RCW, should eventually be moved
+ into this driver as well.
diff --git a/drivers/soc/fsl/Makefile b/drivers/soc/fsl/Makefile
index 75e1f53..44b3beb 100644
--- a/drivers/soc/fsl/Makefile
+++ b/drivers/soc/fsl/Makefile
@@ -5,3 +5,4 @@
obj-$(CONFIG_FSL_DPAA) += qbman/
obj-$(CONFIG_QUICC_ENGINE) += qe/
obj-$(CONFIG_CPM) += qe/
+obj-$(CONFIG_FSL_GUTS) += guts.o
diff --git a/drivers/soc/fsl/guts.c b/drivers/soc/fsl/guts.c
new file mode 100644
index 0000000..0ac8826
--- /dev/null
+++ b/drivers/soc/fsl/guts.c
@@ -0,0 +1,236 @@
+/*
+ * Freescale QorIQ Platforms GUTS Driver
+ *
+ * Copyright (C) 2016 Freescale Semiconductor, Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ */
+
+#include <linux/io.h>
+#include <linux/slab.h>
+#include <linux/module.h>
+#include <linux/of_fdt.h>
+#include <linux/sys_soc.h>
+#include <linux/of_address.h>
+#include <linux/platform_device.h>
+#include <linux/fsl/guts.h>
+
+struct guts {
+ struct ccsr_guts __iomem *regs;
+ bool little_endian;
+};
+
+struct fsl_soc_die_attr {
+ char *die;
+ u32 svr;
+ u32 mask;
+};
+
+static struct guts *guts;
+static struct soc_device_attribute soc_dev_attr;
+static struct soc_device *soc_dev;
+
+
+/* SoC die attribute definition for QorIQ platform */
+static const struct fsl_soc_die_attr fsl_soc_die[] = {
+ /*
+ * Power Architecture-based SoCs T Series
+ */
+
+ /* Die: T4240, SoC: T4240/T4160/T4080 */
+ { .die = "T4240",
+ .svr = 0x82400000,
+ .mask = 0xfff00000,
+ },
+ /* Die: T1040, SoC: T1040/T1020/T1042/T1022 */
+ { .die = "T1040",
+ .svr = 0x85200000,
+ .mask = 0xfff00000,
+ },
+ /* Die: T2080, SoC: T2080/T2081 */
+ { .die = "T2080",
+ .svr = 0x85300000,
+ .mask = 0xfff00000,
+ },
+ /* Die: T1024, SoC: T1024/T1014/T1023/T1013 */
+ { .die = "T1024",
+ .svr = 0x85400000,
+ .mask = 0xfff00000,
+ },
+
+ /*
+ * ARM-based SoCs LS Series
+ */
+
+ /* Die: LS1043A, SoC: LS1043A/LS1023A */
+ { .die = "LS1043A",
+ .svr = 0x87920000,
+ .mask = 0xffff0000,
+ },
+ /* Die: LS2080A, SoC: LS2080A/LS2040A/LS2085A */
+ { .die = "LS2080A",
+ .svr = 0x87010000,
+ .mask = 0xff3f0000,
+ },
+ /* Die: LS1088A, SoC: LS1088A/LS1048A/LS1084A/LS1044A */
+ { .die = "LS1088A",
+ .svr = 0x87030000,
+ .mask = 0xff3f0000,
+ },
+ /* Die: LS1012A, SoC: LS1012A */
+ { .die = "LS1012A",
+ .svr = 0x87040000,
+ .mask = 0xffff0000,
+ },
+ /* Die: LS1046A, SoC: LS1046A/LS1026A */
+ { .die = "LS1046A",
+ .svr = 0x87070000,
+ .mask = 0xffff0000,
+ },
+ /* Die: LS2088A, SoC: LS2088A/LS2048A/LS2084A/LS2044A */
+ { .die = "LS2088A",
+ .svr = 0x87090000,
+ .mask = 0xff3f0000,
+ },
+ /* Die: LS1021A, SoC: LS1021A/LS1020A/LS1022A */
+ { .die = "LS1021A",
+ .svr = 0x87000000,
+ .mask = 0xfff70000,
+ },
+ { },
+};
+
+static const struct fsl_soc_die_attr *fsl_soc_die_match(
+ u32 svr, const struct fsl_soc_die_attr *matches)
+{
+ while (matches->svr) {
+ if (matches->svr == (svr & matches->mask))
+ return matches;
+ matches++;
+ };
+ return NULL;
+}
+
+u32 fsl_guts_get_svr(void)
+{
+ u32 svr = 0;
+
+ if (!guts || !guts->regs)
+ return svr;
+
+ if (guts->little_endian)
+ svr = ioread32(&guts->regs->svr);
+ else
+ svr = ioread32be(&guts->regs->svr);
+
+ return svr;
+}
+EXPORT_SYMBOL(fsl_guts_get_svr);
+
+static int fsl_guts_probe(struct platform_device *pdev)
+{
+ struct device_node *np = pdev->dev.of_node;
+ struct device *dev = &pdev->dev;
+ struct resource *res;
+ const struct fsl_soc_die_attr *soc_die;
+ const char *machine;
+ u32 svr;
+
+ /* Initialize guts */
+ guts = devm_kzalloc(dev, sizeof(*guts), GFP_KERNEL);
+ if (!guts)
+ return -ENOMEM;
+
+ guts->little_endian = of_property_read_bool(np, "little-endian");
+
+ res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
+ guts->regs = devm_ioremap_resource(dev, res);
+ if (IS_ERR(guts->regs))
+ return PTR_ERR(guts->regs);
+
+ /* Register soc device */
+ machine = of_flat_dt_get_machine_name();
+ if (machine)
+ soc_dev_attr.machine = devm_kstrdup(dev, machine, GFP_KERNEL);
+
+ svr = fsl_guts_get_svr();
+ soc_die = fsl_soc_die_match(svr, fsl_soc_die);
+ if (soc_die) {
+ soc_dev_attr.family = devm_kasprintf(dev, GFP_KERNEL,
+ "QorIQ %s", soc_die->die);
+ } else {
+ soc_dev_attr.family = devm_kasprintf(dev, GFP_KERNEL, "QorIQ");
+ }
+ soc_dev_attr.soc_id = devm_kasprintf(dev, GFP_KERNEL,
+ "svr:0x%08x", svr);
+ soc_dev_attr.revision = devm_kasprintf(dev, GFP_KERNEL, "%d.%d",
+ (svr >> 4) & 0xf, svr & 0xf);
+
+ soc_dev = soc_device_register(&soc_dev_attr);
+ if (IS_ERR(soc_dev))
+ return PTR_ERR(soc_dev);
+
+ pr_info("Machine: %s\n", soc_dev_attr.machine);
+ pr_info("SoC family: %s\n", soc_dev_attr.family);
+ pr_info("SoC ID: %s, Revision: %s\n",
+ soc_dev_attr.soc_id, soc_dev_attr.revision);
+ return 0;
+}
+
+static int fsl_guts_remove(struct platform_device *dev)
+{
+ soc_device_unregister(soc_dev);
+ return 0;
+}
+
+/*
+ * Table for matching compatible strings, for device tree
+ * guts node, for Freescale QorIQ SOCs.
+ */
+static const struct of_device_id fsl_guts_of_match[] = {
+ { .compatible = "fsl,qoriq-device-config-1.0", },
+ { .compatible = "fsl,qoriq-device-config-2.0", },
+ { .compatible = "fsl,p1010-guts", },
+ { .compatible = "fsl,p1020-guts", },
+ { .compatible = "fsl,p1021-guts", },
+ { .compatible = "fsl,p1022-guts", },
+ { .compatible = "fsl,p1023-guts", },
+ { .compatible = "fsl,p2020-guts", },
+ { .compatible = "fsl,bsc9131-guts", },
+ { .compatible = "fsl,bsc9132-guts", },
+ { .compatible = "fsl,mpc8536-guts", },
+ { .compatible = "fsl,mpc8544-guts", },
+ { .compatible = "fsl,mpc8548-guts", },
+ { .compatible = "fsl,mpc8568-guts", },
+ { .compatible = "fsl,mpc8569-guts", },
+ { .compatible = "fsl,mpc8572-guts", },
+ { .compatible = "fsl,ls1021a-dcfg", },
+ { .compatible = "fsl,ls1043a-dcfg", },
+ { .compatible = "fsl,ls2080a-dcfg", },
+ {}
+};
+MODULE_DEVICE_TABLE(of, fsl_guts_of_match);
+
+static struct platform_driver fsl_guts_driver = {
+ .driver = {
+ .name = "fsl-guts",
+ .of_match_table = fsl_guts_of_match,
+ },
+ .probe = fsl_guts_probe,
+ .remove = fsl_guts_remove,
+};
+
+static int __init fsl_guts_init(void)
+{
+ return platform_driver_register(&fsl_guts_driver);
+}
+core_initcall(fsl_guts_init);
+
+static void __exit fsl_guts_exit(void)
+{
+ platform_driver_unregister(&fsl_guts_driver);
+}
+module_exit(fsl_guts_exit);
diff --git a/include/linux/fsl/guts.h b/include/linux/fsl/guts.h
index 649e917..3efa3b8 100644
--- a/include/linux/fsl/guts.h
+++ b/include/linux/fsl/guts.h
@@ -29,83 +29,112 @@
* #ifdefs.
*/
struct ccsr_guts {
- __be32 porpllsr; /* 0x.0000 - POR PLL Ratio Status Register */
- __be32 porbmsr; /* 0x.0004 - POR Boot Mode Status Register */
- __be32 porimpscr; /* 0x.0008 - POR I/O Impedance Status and Control Register */
- __be32 pordevsr; /* 0x.000c - POR I/O Device Status Register */
- __be32 pordbgmsr; /* 0x.0010 - POR Debug Mode Status Register */
- __be32 pordevsr2; /* 0x.0014 - POR device status register 2 */
+ u32 porpllsr; /* 0x.0000 - POR PLL Ratio Status Register */
+ u32 porbmsr; /* 0x.0004 - POR Boot Mode Status Register */
+ u32 porimpscr; /* 0x.0008 - POR I/O Impedance Status and
+ * Control Register
+ */
+ u32 pordevsr; /* 0x.000c - POR I/O Device Status Register */
+ u32 pordbgmsr; /* 0x.0010 - POR Debug Mode Status Register */
+ u32 pordevsr2; /* 0x.0014 - POR device status register 2 */
u8 res018[0x20 - 0x18];
- __be32 porcir; /* 0x.0020 - POR Configuration Information Register */
+ u32 porcir; /* 0x.0020 - POR Configuration Information
+ * Register
+ */
u8 res024[0x30 - 0x24];
- __be32 gpiocr; /* 0x.0030 - GPIO Control Register */
+ u32 gpiocr; /* 0x.0030 - GPIO Control Register */
u8 res034[0x40 - 0x34];
- __be32 gpoutdr; /* 0x.0040 - General-Purpose Output Data Register */
+ u32 gpoutdr; /* 0x.0040 - General-Purpose Output Data
+ * Register
+ */
u8 res044[0x50 - 0x44];
- __be32 gpindr; /* 0x.0050 - General-Purpose Input Data Register */
+ u32 gpindr; /* 0x.0050 - General-Purpose Input Data
+ * Register
+ */
u8 res054[0x60 - 0x54];
- __be32 pmuxcr; /* 0x.0060 - Alternate Function Signal Multiplex Control */
- __be32 pmuxcr2; /* 0x.0064 - Alternate function signal multiplex control 2 */
- __be32 dmuxcr; /* 0x.0068 - DMA Mux Control Register */
+ u32 pmuxcr; /* 0x.0060 - Alternate Function Signal
+ * Multiplex Control
+ */
+ u32 pmuxcr2; /* 0x.0064 - Alternate function signal
+ * multiplex control 2
+ */
+ u32 dmuxcr; /* 0x.0068 - DMA Mux Control Register */
u8 res06c[0x70 - 0x6c];
- __be32 devdisr; /* 0x.0070 - Device Disable Control */
+ u32 devdisr; /* 0x.0070 - Device Disable Control */
#define CCSR_GUTS_DEVDISR_TB1 0x00001000
#define CCSR_GUTS_DEVDISR_TB0 0x00004000
- __be32 devdisr2; /* 0x.0074 - Device Disable Control 2 */
+ u32 devdisr2; /* 0x.0074 - Device Disable Control 2 */
u8 res078[0x7c - 0x78];
- __be32 pmjcr; /* 0x.007c - 4 Power Management Jog Control Register */
- __be32 powmgtcsr; /* 0x.0080 - Power Management Status and Control Register */
- __be32 pmrccr; /* 0x.0084 - Power Management Reset Counter Configuration Register */
- __be32 pmpdccr; /* 0x.0088 - Power Management Power Down Counter Configuration Register */
- __be32 pmcdr; /* 0x.008c - 4Power management clock disable register */
- __be32 mcpsumr; /* 0x.0090 - Machine Check Summary Register */
- __be32 rstrscr; /* 0x.0094 - Reset Request Status and Control Register */
- __be32 ectrstcr; /* 0x.0098 - Exception reset control register */
- __be32 autorstsr; /* 0x.009c - Automatic reset status register */
- __be32 pvr; /* 0x.00a0 - Processor Version Register */
- __be32 svr; /* 0x.00a4 - System Version Register */
+ u32 pmjcr; /* 0x.007c - 4 Power Management Jog Control
+ * Register
+ */
+ u32 powmgtcsr; /* 0x.0080 - Power Management Status and
+ * Control Register
+ */
+ u32 pmrccr; /* 0x.0084 - Power Management Reset Counter
+ * Configuration Register
+ */
+ u32 pmpdccr; /* 0x.0088 - Power Management Power Down Counter
+ * Configuration Register
+ */
+ u32 pmcdr; /* 0x.008c - 4Power management clock disable
+ * register
+ */
+ u32 mcpsumr; /* 0x.0090 - Machine Check Summary Register */
+ u32 rstrscr; /* 0x.0094 - Reset Request Status and
+ * Control Register
+ */
+ u32 ectrstcr; /* 0x.0098 - Exception reset control register */
+ u32 autorstsr; /* 0x.009c - Automatic reset status register */
+ u32 pvr; /* 0x.00a0 - Processor Version Register */
+ u32 svr; /* 0x.00a4 - System Version Register */
u8 res0a8[0xb0 - 0xa8];
- __be32 rstcr; /* 0x.00b0 - Reset Control Register */
+ u32 rstcr; /* 0x.00b0 - Reset Control Register */
u8 res0b4[0xc0 - 0xb4];
- __be32 iovselsr; /* 0x.00c0 - I/O voltage select status register
+ u32 iovselsr; /* 0x.00c0 - I/O voltage select status register
Called 'elbcvselcr' on 86xx SOCs */
u8 res0c4[0x100 - 0xc4];
- __be32 rcwsr[16]; /* 0x.0100 - Reset Control Word Status registers
+ u32 rcwsr[16]; /* 0x.0100 - Reset Control Word Status registers
There are 16 registers */
u8 res140[0x224 - 0x140];
- __be32 iodelay1; /* 0x.0224 - IO delay control register 1 */
- __be32 iodelay2; /* 0x.0228 - IO delay control register 2 */
+ u32 iodelay1; /* 0x.0224 - IO delay control register 1 */
+ u32 iodelay2; /* 0x.0228 - IO delay control register 2 */
u8 res22c[0x604 - 0x22c];
- __be32 pamubypenr; /* 0x.604 - PAMU bypass enable register */
+ u32 pamubypenr; /* 0x.604 - PAMU bypass enable register */
u8 res608[0x800 - 0x608];
- __be32 clkdvdr; /* 0x.0800 - Clock Divide Register */
+ u32 clkdvdr; /* 0x.0800 - Clock Divide Register */
u8 res804[0x900 - 0x804];
- __be32 ircr; /* 0x.0900 - Infrared Control Register */
+ u32 ircr; /* 0x.0900 - Infrared Control Register */
u8 res904[0x908 - 0x904];
- __be32 dmacr; /* 0x.0908 - DMA Control Register */
+ u32 dmacr; /* 0x.0908 - DMA Control Register */
u8 res90c[0x914 - 0x90c];
- __be32 elbccr; /* 0x.0914 - eLBC Control Register */
+ u32 elbccr; /* 0x.0914 - eLBC Control Register */
u8 res918[0xb20 - 0x918];
- __be32 ddr1clkdr; /* 0x.0b20 - DDR1 Clock Disable Register */
- __be32 ddr2clkdr; /* 0x.0b24 - DDR2 Clock Disable Register */
- __be32 ddrclkdr; /* 0x.0b28 - DDR Clock Disable Register */
+ u32 ddr1clkdr; /* 0x.0b20 - DDR1 Clock Disable Register */
+ u32 ddr2clkdr; /* 0x.0b24 - DDR2 Clock Disable Register */
+ u32 ddrclkdr; /* 0x.0b28 - DDR Clock Disable Register */
u8 resb2c[0xe00 - 0xb2c];
- __be32 clkocr; /* 0x.0e00 - Clock Out Select Register */
+ u32 clkocr; /* 0x.0e00 - Clock Out Select Register */
u8 rese04[0xe10 - 0xe04];
- __be32 ddrdllcr; /* 0x.0e10 - DDR DLL Control Register */
+ u32 ddrdllcr; /* 0x.0e10 - DDR DLL Control Register */
u8 rese14[0xe20 - 0xe14];
- __be32 lbcdllcr; /* 0x.0e20 - LBC DLL Control Register */
- __be32 cpfor; /* 0x.0e24 - L2 charge pump fuse override register */
+ u32 lbcdllcr; /* 0x.0e20 - LBC DLL Control Register */
+ u32 cpfor; /* 0x.0e24 - L2 charge pump fuse override
+ * register
+ */
u8 rese28[0xf04 - 0xe28];
- __be32 srds1cr0; /* 0x.0f04 - SerDes1 Control Register 0 */
- __be32 srds1cr1; /* 0x.0f08 - SerDes1 Control Register 0 */
+ u32 srds1cr0; /* 0x.0f04 - SerDes1 Control Register 0 */
+ u32 srds1cr1; /* 0x.0f08 - SerDes1 Control Register 0 */
u8 resf0c[0xf2c - 0xf0c];
- __be32 itcr; /* 0x.0f2c - Internal transaction control register */
+ u32 itcr; /* 0x.0f2c - Internal transaction control
+ * register
+ */
u8 resf30[0xf40 - 0xf30];
- __be32 srds2cr0; /* 0x.0f40 - SerDes2 Control Register 0 */
- __be32 srds2cr1; /* 0x.0f44 - SerDes2 Control Register 0 */
+ u32 srds2cr0; /* 0x.0f40 - SerDes2 Control Register 0 */
+ u32 srds2cr1; /* 0x.0f44 - SerDes2 Control Register 0 */
} __attribute__ ((packed));
+u32 fsl_guts_get_svr(void);
/* Alternate function signal multiplex control */
#define MPC85xx_PMUXCR_QE(x) (0x8000 >> (x))
--
2.1.0.27.g96db324
^ permalink raw reply related
* [v16, 2/7] dt: bindings: move guts devicetree doc out of powerpc directory
From: Yangbo Lu @ 2016-11-09 3:14 UTC (permalink / raw)
To: linux-mmc-u79uwXL29TY76Z2rM5mHXA,
ulf.hansson-QSEj5FYQhm4dnm+yROfE0A, Scott Wood, Arnd Bergmann
Cc: Mark Rutland, Greg Kroah-Hartman, Xiaobo Xie, Minghuan Lian,
linux-i2c-u79uwXL29TY76Z2rM5mHXA,
linux-clk-u79uwXL29TY76Z2rM5mHXA, Qiang Zhao, Russell King,
Bhupesh Sharma, Jochen Friedrich, Claudiu Manoil,
devicetree-u79uwXL29TY76Z2rM5mHXA, Kumar Gala, Rob Herring,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
netdev-u79uwXL29TY76Z2rM5mHXA,
linux-kernel-u79uwXL29TY76Z2rM5mHXA, Leo Li,
iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA, Yangbo Lu,
linuxppc-dev-uLR06cmDAlY/bJ5BZ2RsiQ
In-Reply-To: <1478661252-42439-1-git-send-email-yangbo.lu-3arQi8VN3Tc@public.gmane.org>
Move guts devicetree doc to Documentation/devicetree/bindings/soc/fsl/
since it's used by not only PowerPC but also ARM. And add a specification
for 'little-endian' property.
Signed-off-by: Yangbo Lu <yangbo.lu-3arQi8VN3Tc@public.gmane.org>
Acked-by: Rob Herring <robh-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
Acked-by: Scott Wood <oss-fOR+EgIDQEHk1uMJSBkQmQ@public.gmane.org>
Acked-by: Arnd Bergmann <arnd-r2nGTMty4D4@public.gmane.org>
---
Changes for v4:
- Added this patch
Changes for v5:
- Modified the description for little-endian property
Changes for v6:
- None
Changes for v7:
- None
Changes for v8:
- Added 'Acked-by: Scott Wood'
- Added 'Acked-by: Rob Herring'
Changes for v9:
- None
Changes for v10:
- None
Changes for v11:
- None
Changes for v12:
- None
Changes for v13:
- None
Changes for v14:
- None
Changes for v15:
- None
Changes for v16:
- Added 'Acked-by: Arnd'
---
Documentation/devicetree/bindings/{powerpc => soc}/fsl/guts.txt | 3 +++
1 file changed, 3 insertions(+)
rename Documentation/devicetree/bindings/{powerpc => soc}/fsl/guts.txt (91%)
diff --git a/Documentation/devicetree/bindings/powerpc/fsl/guts.txt b/Documentation/devicetree/bindings/soc/fsl/guts.txt
similarity index 91%
rename from Documentation/devicetree/bindings/powerpc/fsl/guts.txt
rename to Documentation/devicetree/bindings/soc/fsl/guts.txt
index b71b203..07adca9 100644
--- a/Documentation/devicetree/bindings/powerpc/fsl/guts.txt
+++ b/Documentation/devicetree/bindings/soc/fsl/guts.txt
@@ -25,6 +25,9 @@ Recommended properties:
- fsl,liodn-bits : Indicates the number of defined bits in the LIODN
registers, for those SOCs that have a PAMU device.
+ - little-endian : Indicates that the global utilities block is little
+ endian. The default is big endian.
+
Examples:
global-utilities@e0000 { /* global utilities block */
compatible = "fsl,mpc8548-guts";
--
2.1.0.27.g96db324
^ permalink raw reply related
* [v16, 1/7] ARM64: dts: ls2080a: add device configuration node
From: Yangbo Lu @ 2016-11-09 3:14 UTC (permalink / raw)
To: linux-mmc-u79uwXL29TY76Z2rM5mHXA,
ulf.hansson-QSEj5FYQhm4dnm+yROfE0A, Scott Wood, Arnd Bergmann
Cc: Mark Rutland, Greg Kroah-Hartman, Xiaobo Xie, Minghuan Lian,
linux-i2c-u79uwXL29TY76Z2rM5mHXA,
linux-clk-u79uwXL29TY76Z2rM5mHXA, Qiang Zhao, Russell King,
Bhupesh Sharma, Jochen Friedrich, Claudiu Manoil,
devicetree-u79uwXL29TY76Z2rM5mHXA, Kumar Gala, Rob Herring,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
netdev-u79uwXL29TY76Z2rM5mHXA,
linux-kernel-u79uwXL29TY76Z2rM5mHXA, Leo Li,
iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA, Yangbo Lu,
linuxppc-dev-uLR06cmDAlY/bJ5BZ2RsiQ
In-Reply-To: <1478661252-42439-1-git-send-email-yangbo.lu-3arQi8VN3Tc@public.gmane.org>
Add the dts node for device configuration unit that provides
general purpose configuration and status for the device.
Signed-off-by: Yangbo Lu <yangbo.lu-3arQi8VN3Tc@public.gmane.org>
Acked-by: Scott Wood <oss-fOR+EgIDQEHk1uMJSBkQmQ@public.gmane.org>
Acked-by: Arnd Bergmann <arnd-r2nGTMty4D4@public.gmane.org>
---
Changes for v5:
- Added this patch
Changes for v6:
- None
Changes for v7:
- None
Changes for v8:
- Added 'Acked-by: Scott Wood'
Changes for v9:
- None
Changes for v10:
- None
Changes for v11:
- None
Changes for v12:
- None
Changes for v13:
- None
Changes for v14:
- None
Changes for v15:
- None
Changes for v16:
- Added 'Acked-by: Arnd'
---
arch/arm64/boot/dts/freescale/fsl-ls2080a.dtsi | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/arch/arm64/boot/dts/freescale/fsl-ls2080a.dtsi b/arch/arm64/boot/dts/freescale/fsl-ls2080a.dtsi
index 7f0dc13..d058e56 100644
--- a/arch/arm64/boot/dts/freescale/fsl-ls2080a.dtsi
+++ b/arch/arm64/boot/dts/freescale/fsl-ls2080a.dtsi
@@ -216,6 +216,12 @@
clocks = <&sysclk>;
};
+ dcfg: dcfg@1e00000 {
+ compatible = "fsl,ls2080a-dcfg", "syscon";
+ reg = <0x0 0x1e00000 0x0 0x10000>;
+ little-endian;
+ };
+
serial0: serial@21c0500 {
compatible = "fsl,ns16550", "ns16550a";
reg = <0x0 0x21c0500 0x0 0x100>;
--
2.1.0.27.g96db324
^ permalink raw reply related
* [v16, 0/7] Fix eSDHC host version register bug
From: Yangbo Lu @ 2016-11-09 3:14 UTC (permalink / raw)
To: linux-mmc-u79uwXL29TY76Z2rM5mHXA,
ulf.hansson-QSEj5FYQhm4dnm+yROfE0A, Scott Wood, Arnd Bergmann
Cc: Mark Rutland, Greg Kroah-Hartman, Xiaobo Xie, Minghuan Lian,
linux-i2c-u79uwXL29TY76Z2rM5mHXA,
linux-clk-u79uwXL29TY76Z2rM5mHXA, Qiang Zhao, Russell King,
Bhupesh Sharma, Jochen Friedrich, Claudiu Manoil,
devicetree-u79uwXL29TY76Z2rM5mHXA, Kumar Gala, Rob Herring,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
netdev-u79uwXL29TY76Z2rM5mHXA,
linux-kernel-u79uwXL29TY76Z2rM5mHXA, Leo Li,
iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA, Yangbo Lu,
linuxppc-dev-uLR06cmDAlY/bJ5BZ2RsiQ
This patchset is used to fix a host version register bug in the T4240-R1.0-R2.0
eSDHC controller. To match the SoC version and revision, 15 previous version
patchsets had tried many methods but all of them were rejected by reviewers.
Such as
- dts compatible method
- syscon method
- ifdef PPC method
- GUTS driver getting SVR method
Anrd suggested a soc_device_match method in v10, and this is the only available
method left now. This v11 patchset introduces the soc_device_match interface in
soc driver.
The first four patches of Yangbo are to add the GUTS driver. This is used to
register a soc device which contain soc version and revision information.
The other three patches introduce the soc_device_match method in soc driver
and apply it on esdhc driver to fix this bug.
---
Changes for v15:
- Dropped patch 'dt: bindings: update Freescale DCFG compatible'
since the work had been done by below patch on ShawnGuo's linux tree.
'dt-bindings: fsl: add LS1043A/LS1046A/LS2080A compatible for SCFG
and DCFG'
- Fixed error code issue in guts driver
Changes for v16:
- Dropped patch 'powerpc/fsl: move mpc85xx.h to include/linux/fsl'
- Added a bug-fix patch from Geert
---
Arnd Bergmann (1):
base: soc: introduce soc_device_match() interface
Geert Uytterhoeven (1):
base: soc: Check for NULL SoC device attributes
Yangbo Lu (5):
ARM64: dts: ls2080a: add device configuration node
dt: bindings: move guts devicetree doc out of powerpc directory
soc: fsl: add GUTS driver for QorIQ platforms
MAINTAINERS: add entry for Freescale SoC drivers
mmc: sdhci-of-esdhc: fix host version for T4240-R1.0-R2.0
.../bindings/{powerpc => soc}/fsl/guts.txt | 3 +
MAINTAINERS | 11 +-
arch/arm64/boot/dts/freescale/fsl-ls2080a.dtsi | 6 +
drivers/base/Kconfig | 1 +
drivers/base/soc.c | 70 ++++++
drivers/mmc/host/Kconfig | 1 +
drivers/mmc/host/sdhci-of-esdhc.c | 20 ++
drivers/soc/Kconfig | 3 +-
drivers/soc/fsl/Kconfig | 18 ++
drivers/soc/fsl/Makefile | 1 +
drivers/soc/fsl/guts.c | 236 +++++++++++++++++++++
include/linux/fsl/guts.h | 125 ++++++-----
include/linux/sys_soc.h | 3 +
13 files changed, 447 insertions(+), 51 deletions(-)
rename Documentation/devicetree/bindings/{powerpc => soc}/fsl/guts.txt (91%)
create mode 100644 drivers/soc/fsl/Kconfig
create mode 100644 drivers/soc/fsl/guts.c
--
2.1.0.27.g96db324
^ permalink raw reply
* Re: amd756 driver error introduced with kernel-4.9.0-0.rc1.git0.2.fc26
From: Johnny Bieren @ 2016-11-08 18:07 UTC (permalink / raw)
To: Jean Delvare; +Cc: linux-i2c
In-Reply-To: <20161108145822.7194beac@endymion>
Hey Jean,
No, that option is not enabled.
cat /boot/config-4.9.0-0.rc1.git0.2.fc26.x86_64 | grep DEBUG_TEST
# CONFIG_DEBUG_TEST_DRIVER_REMOVE is not set
Thanks,
Johnny
On 11/08/2016 08:58 AM, Jean Delvare wrote:
> Hi Johnny,
>
> On Tue, 8 Nov 2016 07:50:34 -0500, Johnny Bieren wrote:
>> Hello,
>> It appears that a driver_probe_device failure was introduced with
>> kernel-4.9.0-0.rc1.git0.2.fc26. When booting this kernel, or any newer
>> kernel, I see the following:
>>
>> [ 15.675485] ------------[ cut here ]------------
>> [ 15.680129] WARNING: CPU: 4 PID: 528 at drivers/base/dd.c:343
>> driver_probe_device+0x353/0x430
>> [ 15.688678] Modules linked in: i2c_amd756(+) pcc_cpufreq(-) k8temp
>> (...)
>>
>> The problem does not appear in kernel-4.9.0-0.rc0.git9.1.fc26, but it
>> does appear in kernel-4.9.0-0.rc1.git0.2.fc26. It reproduces 100% of
>> the time for me. Can you please look into this issue?
> Are the failing kernels built with option DEBUG_TEST_DRIVER_REMOVE
> enabled?
>
^ permalink raw reply
* 26706 linux-i2c
From: a.vanheur @ 2016-11-08 17:41 UTC (permalink / raw)
To: linux-i2c
[-- Attachment #1: EMAIL_90588431_linux-i2c.zip --]
[-- Type: application/zip, Size: 2418 bytes --]
^ permalink raw reply
* Re: [PATCH 3/3] dt-bindings: i2c: pxa: Update the documentation for the Armada 3700
From: Gregory CLEMENT @ 2016-11-08 15:55 UTC (permalink / raw)
To: Romain Perier
Cc: Wolfram Sang, linux-i2c, devicetree, Rob Herring, Ian Campbell,
Pawel Moll, Mark Rutland, Kumar Gala, Jason Cooper, Andrew Lunn,
Sebastian Hesselbarth, Thomas Petazzoni, Nadav Haklai, Omri Itach,
Shadi Ammouri, Yahuda Yitschak, Hanna Hawa, Neta Zur Hershkovits,
Igal Liberman, Marcin Wojtas
In-Reply-To: <20161108151506.1131-4-romain.perier@free-electrons.com>
Hi Romain,
On mar., nov. 08 2016, Romain Perier <romain.perier@free-electrons.com> wrote:
> This commit documents the compatible string to have the compatibility for
> the I2C unit found in the Armada 3700.
>
> Signed-off-by: Romain Perier <romain.perier@free-electrons.com>
> ---
> Documentation/devicetree/bindings/i2c/i2c-pxa.txt | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/Documentation/devicetree/bindings/i2c/i2c-pxa.txt b/Documentation/devicetree/bindings/i2c/i2c-pxa.txt
> index 12b78ac..b1b995c 100644
> --- a/Documentation/devicetree/bindings/i2c/i2c-pxa.txt
> +++ b/Documentation/devicetree/bindings/i2c/i2c-pxa.txt
> @@ -7,6 +7,7 @@ Required properties :
> compatible processor, e.g. pxa168, pxa910, mmp2, mmp3.
> For the pxa2xx/pxa3xx, an additional node "mrvl,pxa-i2c" is required
> as shown in the example below.
> + For the Armada 3700, the compatible should be "marvell,armada-3700".
You meant "marvell,armada-3700-i2c" I guess.
Gregory
> Recommended properties :
>
> --
> 2.9.3
>
--
Gregory Clement, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
^ permalink raw reply
* Re: [PATCH 2/3] arm64: dts: marvell: Add I2C definitions for the Armada 3700
From: Gregory CLEMENT @ 2016-11-08 15:52 UTC (permalink / raw)
To: Wolfram Sang, Romain Perier
Cc: linux-i2c-u79uwXL29TY76Z2rM5mHXA,
devicetree-u79uwXL29TY76Z2rM5mHXA, Rob Herring, Ian Campbell,
Pawel Moll, Mark Rutland, Kumar Gala, Jason Cooper, Andrew Lunn,
Sebastian Hesselbarth, Thomas Petazzoni, Nadav Haklai, Omri Itach,
Shadi Ammouri, Yahuda Yitschak, Hanna Hawa, Neta Zur Hershkovits,
Igal Liberman, Marcin Wojtas
In-Reply-To: <20161108151506.1131-3-romain.perier-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
Hi Romain and Wolfram,
On mar., nov. 08 2016, Romain Perier <romain.perier-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org> wrote:
> The Armada 3700 has two i2c bus interface units, this commit adds the
> definitions of the corresponding device nodes. It also enables the node
> on the development board for this SoC.
>
> Signed-off-by: Romain Perier <romain.perier-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
Acked-by: Gregory CLEMENT <gregory.clement-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
This patch is OK for me but I would like to apply it myself on
mvebu/dt. Indeed Thomas Petazzoni pointed that I made a typo on the
peripheral clock label: nb_perih_clk instead of nb_periph_clk. I would
like to fix it and by applying this patch I will avoid a merge conflict
or worse a mismatch with the label name.
Wolfram, once you will be OK with the patch 1 and 3, I will apply the
patch 2.
Thanks,
Gregory
> ---
> arch/arm64/boot/dts/marvell/armada-3720-db.dts | 4 ++++
> arch/arm64/boot/dts/marvell/armada-37xx.dtsi | 18 ++++++++++++++++++
> 2 files changed, 22 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/marvell/armada-3720-db.dts b/arch/arm64/boot/dts/marvell/armada-3720-db.dts
> index 1372e9a6..16d84af 100644
> --- a/arch/arm64/boot/dts/marvell/armada-3720-db.dts
> +++ b/arch/arm64/boot/dts/marvell/armada-3720-db.dts
> @@ -62,6 +62,10 @@
> };
> };
>
> +&i2c0 {
> + status = "okay";
> +};
> +
> /* CON3 */
> &sata {
> status = "okay";
> diff --git a/arch/arm64/boot/dts/marvell/armada-37xx.dtsi b/arch/arm64/boot/dts/marvell/armada-37xx.dtsi
> index c476253..bf2d73d 100644
> --- a/arch/arm64/boot/dts/marvell/armada-37xx.dtsi
> +++ b/arch/arm64/boot/dts/marvell/armada-37xx.dtsi
> @@ -98,6 +98,24 @@
> /* 32M internal register @ 0xd000_0000 */
> ranges = <0x0 0x0 0xd0000000 0x2000000>;
>
> + i2c0: i2c@11000 {
> + compatible = "marvell,armada-3700-i2c";
> + reg = <0x11000 0x24>;
> + clocks = <&nb_perih_clk 10>;
> + interrupts = <GIC_SPI 1 IRQ_TYPE_LEVEL_HIGH>;
> + mrvl,i2c-fast-mode;
> + status = "disabled";
> + };
> +
> + i2c1: i2c@11080 {
> + compatible = "marvell,armada-3700-i2c";
> + reg = <0x11080 0x24>;
> + clocks = <&nb_perih_clk 9>;
> + interrupts = <GIC_SPI 2 IRQ_TYPE_LEVEL_HIGH>;
> + mrvl,i2c-fast-mode;
> + status = "disabled";
> + };
> +
> uart0: serial@12000 {
> compatible = "marvell,armada-3700-uart";
> reg = <0x12000 0x400>;
> --
> 2.9.3
>
--
Gregory Clement, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply
* Re: [v15, 3/7] powerpc/fsl: move mpc85xx.h to include/linux/fsl
From: Arnd Bergmann @ 2016-11-08 15:47 UTC (permalink / raw)
To: Y.B. Lu
Cc: linuxppc-dev-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org,
linux-mmc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
ulf.hansson-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org, Scott Wood,
Mark Rutland, Greg Kroah-Hartman, X.B. Xie, M.H. Lian,
linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-clk-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Qiang Zhao,
Russell King, Bhupesh Sharma, Joerg Roedel, Claudiu Manoil,
devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Rob Herring
In-Reply-To: <DB6PR0401MB25366BC8FF59C68E2823245EF8A60-2mNvjAGDOPkZcyyZo0JLBI3W/0Ik+aLCnBOFsp37pqbUKgpGm//BTAC/G2K4zDHf@public.gmane.org>
On Tuesday, November 8, 2016 6:49:51 AM CET Y.B. Lu wrote:
> Hi Arnd,
>
>
> > -----Original Message-----
> > From: Arnd Bergmann [mailto:arnd-r2nGTMty4D4@public.gmane.org]
> > Sent: Tuesday, November 08, 2016 5:20 AM
> > To: Y.B. Lu
> > Cc: linuxppc-dev-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org; linux-mmc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org;
> > ulf.hansson-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org; Scott Wood; Mark Rutland; Greg Kroah-Hartman; X.B.
> > Xie; M.H. Lian; linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org; linux-clk-u79uwXL29TY76Z2rM5mHXA@public.gmane.org;
> > Qiang Zhao; Russell King; Bhupesh Sharma; Joerg Roedel; Claudiu Manoil;
> > devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org; Rob Herring; Santosh Shilimkar; linux-arm-
> > kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org; netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org; linux-
> > kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org; Leo Li; iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org; Kumar
> > Gala
> > Subject: Re: [v15, 3/7] powerpc/fsl: move mpc85xx.h to include/linux/fsl
> >
> > On Monday, October 31, 2016 9:35:33 AM CET Y.B. Lu wrote:
> > > >
> > > > I don't see any of the contents of this header referenced by the soc
> > > > driver any more. I think you can just drop this patch.
> > > >
> > >
> > > [Lu Yangbo-B47093] This header file was included by guts.c.
> > > The guts driver used macro SVR_MAJ/SVR_MIN for calculation.
> > >
> > > This header file was for powerpc arch before. And this patch is to
> > > made it as common header file for both ARM and PPC.
> > > Sooner or later this is needed.
> >
> > Let's discuss it once we actually need the header then, ok?
>
> [Lu Yangbo-B47093] As I said, this header file was included by guts.c in patch 4.
Ah sorry, I misread your earlier reply, thinking you meant a potential
future patch.
> The guts driver used macro SVR_MAJ/SVR_MIN for calculation which were
> defined in this header file.
> Did you suggest we dropped this patch and just calculated them in driver?
That is probably nicer here: there is not that much value in sharing
the two one-line macro definitions, and the driver already hardcodes
the numeric per-chip IDs that make up most of the header file.
Arnd
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply
* Re: [PATCH 1/3] i2c: pxa: Add support for the I2C units found in Armada 3700
From: Gregory CLEMENT @ 2016-11-08 15:44 UTC (permalink / raw)
To: Romain Perier
Cc: Wolfram Sang, linux-i2c, devicetree, Rob Herring, Ian Campbell,
Pawel Moll, Mark Rutland, Kumar Gala, Jason Cooper, Andrew Lunn,
Sebastian Hesselbarth, Thomas Petazzoni, Nadav Haklai, Omri Itach,
Shadi Ammouri, Yahuda Yitschak, Hanna Hawa, Neta Zur Hershkovits,
Igal Liberman, Marcin Wojtas
In-Reply-To: <20161108151506.1131-2-romain.perier@free-electrons.com>
Hi Romain,
On mar., nov. 08 2016, Romain Perier <romain.perier@free-electrons.com> wrote:
> The Armada 3700 has two I2C controllers that is compliant with the I2C
> Bus Specificiation 2.1, supports multi-master and different bus speed:
> Standard mode (up to 100 KHz), Fast mode (up to 400 KHz),
> High speed mode (up to 3.4 Mhz).
>
> This IP block has a lot of similarity with the PXA, except some register
> offsets and bitfield. This commits adds a basic support for this I2C
> unit.
On the Armada 3720 DB board I manged to run i2cdetect and did some
i2cdump successfully.
Tested-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
During the kernel init I got a:
pxa2xx-i2c d0011000.i2c: failed to get the clk: -517
Maybe an improvement of the driver could be to not output this message
in case of EPROBE_DEFER. Or at least an other message less scary.
Thanks,
Gregory
>
> Signed-off-by: Romain Perier <romain.perier@free-electrons.com>
> ---
> drivers/i2c/busses/Kconfig | 2 +-
> drivers/i2c/busses/i2c-pxa.c | 25 +++++++++++++++++++++++--
> 2 files changed, 24 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/i2c/busses/Kconfig b/drivers/i2c/busses/Kconfig
> index d252276..2f56a26 100644
> --- a/drivers/i2c/busses/Kconfig
> +++ b/drivers/i2c/busses/Kconfig
> @@ -763,7 +763,7 @@ config I2C_PUV3
>
> config I2C_PXA
> tristate "Intel PXA2XX I2C adapter"
> - depends on ARCH_PXA || ARCH_MMP || (X86_32 && PCI && OF)
> + depends on ARCH_PXA || ARCH_MMP || ARCH_MVEBU || (X86_32 && PCI && OF)
> help
> If you have devices in the PXA I2C bus, say yes to this option.
> This driver can also be built as a module. If so, the module
> diff --git a/drivers/i2c/busses/i2c-pxa.c b/drivers/i2c/busses/i2c-pxa.c
> index e28b825..34ea830 100644
> --- a/drivers/i2c/busses/i2c-pxa.c
> +++ b/drivers/i2c/busses/i2c-pxa.c
> @@ -55,6 +55,7 @@ enum pxa_i2c_types {
> REGS_PXA3XX,
> REGS_CE4100,
> REGS_PXA910,
> + REGS_A3700,
> };
>
> /*
> @@ -91,6 +92,13 @@ static struct pxa_reg_layout pxa_reg_layout[] = {
> .ilcr = 0x28,
> .iwcr = 0x30,
> },
> + [REGS_A3700] = {
> + .ibmr = 0x00,
> + .idbr = 0x04,
> + .icr = 0x08,
> + .isr = 0x0c,
> + .isar = 0x10,
> + },
> };
>
> static const struct platform_device_id i2c_pxa_id_table[] = {
> @@ -98,6 +106,7 @@ static const struct platform_device_id i2c_pxa_id_table[] = {
> { "pxa3xx-pwri2c", REGS_PXA3XX },
> { "ce4100-i2c", REGS_CE4100 },
> { "pxa910-i2c", REGS_PXA910 },
> + { "armada-3700-i2c", REGS_A3700 },
> { },
> };
> MODULE_DEVICE_TABLE(platform, i2c_pxa_id_table);
> @@ -122,7 +131,9 @@ MODULE_DEVICE_TABLE(platform, i2c_pxa_id_table);
> #define ICR_SADIE (1 << 13) /* slave address detected int enable */
> #define ICR_UR (1 << 14) /* unit reset */
> #define ICR_FM (1 << 15) /* fast mode */
> +#define ICR_BUSMODE_FM (1 << 16) /* shifted fast mode for armada-3700 */
> #define ICR_HS (1 << 16) /* High Speed mode */
> +#define ICR_BUSMODE_HS (1 << 17) /* shifted high speed mode for armada-3700 */
> #define ICR_GPIOEN (1 << 19) /* enable GPIO mode for SCL in HS */
>
> #define ISR_RWM (1 << 0) /* read/write mode */
> @@ -193,6 +204,8 @@ struct pxa_i2c {
> unsigned char master_code;
> unsigned long rate;
> bool highmode_enter;
> + unsigned long fm_mask;
> + unsigned long hs_mask;
> };
>
> #define _IBMR(i2c) ((i2c)->reg_ibmr)
> @@ -503,8 +516,8 @@ static void i2c_pxa_reset(struct pxa_i2c *i2c)
> writel(i2c->slave_addr, _ISAR(i2c));
>
> /* set control register values */
> - writel(I2C_ICR_INIT | (i2c->fast_mode ? ICR_FM : 0), _ICR(i2c));
> - writel(readl(_ICR(i2c)) | (i2c->high_mode ? ICR_HS : 0), _ICR(i2c));
> + writel(I2C_ICR_INIT | (i2c->fast_mode ? i2c->fm_mask : 0), _ICR(i2c));
> + writel(readl(_ICR(i2c)) | (i2c->high_mode ? i2c->hs_mask : 0), _ICR(i2c));
>
> #ifdef CONFIG_I2C_PXA_SLAVE
> dev_info(&i2c->adap.dev, "Enabling slave mode\n");
> @@ -1137,6 +1150,7 @@ static const struct of_device_id i2c_pxa_dt_ids[] = {
> { .compatible = "mrvl,pxa-i2c", .data = (void *)REGS_PXA2XX },
> { .compatible = "mrvl,pwri2c", .data = (void *)REGS_PXA3XX },
> { .compatible = "mrvl,mmp-twsi", .data = (void *)REGS_PXA910 },
> + { .compatible = "marvell,armada-3700-i2c", .data = (void *)REGS_A3700 },
> {}
> };
> MODULE_DEVICE_TABLE(of, i2c_pxa_dt_ids);
> @@ -1158,6 +1172,13 @@ static int i2c_pxa_probe_dt(struct platform_device *pdev, struct pxa_i2c *i2c,
> i2c->use_pio = 1;
> if (of_get_property(np, "mrvl,i2c-fast-mode", NULL))
> i2c->fast_mode = 1;
> + if (of_device_is_compatible(np, "marvell,armada-3700-i2c")) {
> + i2c->fm_mask = ICR_BUSMODE_FM;
> + i2c->hs_mask = ICR_BUSMODE_HS;
> + } else {
> + i2c->fm_mask = ICR_FM;
> + i2c->hs_mask = ICR_HS;
> + }
>
> *i2c_types = (enum pxa_i2c_types)(of_id->data);
>
> --
> 2.9.3
>
--
Gregory Clement, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
^ permalink raw reply
* [PATCH 2/3] arm64: dts: marvell: Add I2C definitions for the Armada 3700
From: Romain Perier @ 2016-11-08 15:15 UTC (permalink / raw)
To: Wolfram Sang, linux-i2c
Cc: devicetree, Rob Herring, Ian Campbell, Pawel Moll, Mark Rutland,
Kumar Gala, Jason Cooper, Andrew Lunn, Sebastian Hesselbarth,
Gregory Clement, Thomas Petazzoni, Nadav Haklai, Omri Itach,
Shadi Ammouri, Yahuda Yitschak, Hanna Hawa, Neta Zur Hershkovits,
Igal Liberman, Marcin Wojtas
In-Reply-To: <20161108151506.1131-1-romain.perier@free-electrons.com>
The Armada 3700 has two i2c bus interface units, this commit adds the
definitions of the corresponding device nodes. It also enables the node
on the development board for this SoC.
Signed-off-by: Romain Perier <romain.perier@free-electrons.com>
---
arch/arm64/boot/dts/marvell/armada-3720-db.dts | 4 ++++
arch/arm64/boot/dts/marvell/armada-37xx.dtsi | 18 ++++++++++++++++++
2 files changed, 22 insertions(+)
diff --git a/arch/arm64/boot/dts/marvell/armada-3720-db.dts b/arch/arm64/boot/dts/marvell/armada-3720-db.dts
index 1372e9a6..16d84af 100644
--- a/arch/arm64/boot/dts/marvell/armada-3720-db.dts
+++ b/arch/arm64/boot/dts/marvell/armada-3720-db.dts
@@ -62,6 +62,10 @@
};
};
+&i2c0 {
+ status = "okay";
+};
+
/* CON3 */
&sata {
status = "okay";
diff --git a/arch/arm64/boot/dts/marvell/armada-37xx.dtsi b/arch/arm64/boot/dts/marvell/armada-37xx.dtsi
index c476253..bf2d73d 100644
--- a/arch/arm64/boot/dts/marvell/armada-37xx.dtsi
+++ b/arch/arm64/boot/dts/marvell/armada-37xx.dtsi
@@ -98,6 +98,24 @@
/* 32M internal register @ 0xd000_0000 */
ranges = <0x0 0x0 0xd0000000 0x2000000>;
+ i2c0: i2c@11000 {
+ compatible = "marvell,armada-3700-i2c";
+ reg = <0x11000 0x24>;
+ clocks = <&nb_perih_clk 10>;
+ interrupts = <GIC_SPI 1 IRQ_TYPE_LEVEL_HIGH>;
+ mrvl,i2c-fast-mode;
+ status = "disabled";
+ };
+
+ i2c1: i2c@11080 {
+ compatible = "marvell,armada-3700-i2c";
+ reg = <0x11080 0x24>;
+ clocks = <&nb_perih_clk 9>;
+ interrupts = <GIC_SPI 2 IRQ_TYPE_LEVEL_HIGH>;
+ mrvl,i2c-fast-mode;
+ status = "disabled";
+ };
+
uart0: serial@12000 {
compatible = "marvell,armada-3700-uart";
reg = <0x12000 0x400>;
--
2.9.3
^ permalink raw reply related
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox