All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: Wan ZongShun <mcuos.com@gmail.com>
Cc: devicetree@vger.kernel.org, Wan Zongshun <vw@iommu.org>,
	Jason Cooper <jason@lakedaemon.net>,
	Daniel Lezcano <daniel.lezcano@linaro.org>,
	Russell King <linux@armlinux.org.uk>,
	linux-kernel <linux-kernel@vger.kernel.org>,
	p.zabel@pengutronix.de, Thomas Gleixner <tglx@linutronix.de>,
	linux-clk@vger.kernel.org,
	linux-arm-kernel <linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH v2 06/10] soc: Add SoC specific driver support for nuc900
Date: Mon, 11 Jul 2016 12:36:16 +0200	[thread overview]
Message-ID: <3879062.QodNaKgPKS@wuerfel> (raw)
In-Reply-To: <CAKT61h_vxcvVqqaDOn2XgtF7cBEpziSjfHRaY3eCWmM1ATfDXw@mail.gmail.com>

T24gTW9uZGF5LCBKdWx5IDExLCAyMDE2IDY6Mjg6NTcgUE0gQ0VTVCBXYW4gWm9uZ1NodW4gd3Jv
dGU6Cj4gMjAxNi0wNy0xMSAxODoyNCBHTVQrMDg6MDAgQXJuZCBCZXJnbWFubiA8YXJuZEBhcm5k
Yi5kZT46Cj4gPiBPbiBNb25kYXksIEp1bHkgMTEsIDIwMTYgNTowNzowMSBQTSBDRVNUIFdhbiBa
b25nc2h1biB3cm90ZToKPiA+Pgo+ID4+IE9uIDIwMTblubQwN+aciDEx5pelIDE2OjAzLCBBcm5k
IEJlcmdtYW5uIHdyb3RlOgo+ID4+ID4gT24gU3VuZGF5LCBKdWx5IDEwLCAyMDE2IDM6Mjc6MjYg
UE0gQ0VTVCBXYW4gWm9uZ3NodW4gd3JvdGU6Cj4gPj4gPj4gKyAgICAgICByZXQgPSBvZl9wcm9w
ZXJ0eV9yZWFkX3N0cmluZyhucCwgImNvbXBhdGlibGUiLCAmc29jX2Rldl9hdHRyLT5zb2NfaWQp
Owo+ID4+ID4+ICsgICAgICAgaWYgKHJ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uCgoJQXJuZAoKX19fX19fX19fX19fX19fX19fX19fX19f
X19fX19fX19fX19fX19fX19fX19fX18KbGludXgtYXJtLWtlcm5lbCBtYWlsaW5nIGxpc3QKbGlu
dXgtYXJtLWtlcm5lbEBsaXN0cy5pbmZyYWRlYWQub3JnCmh0dHA6Ly9saXN0cy5pbmZyYWRlYWQu
b3JnL21haWxtYW4vbGlzdGluZm8vbGludXgtYXJtLWtlcm5lbAo=

WARNING: multiple messages have this Message-ID (diff)
From: arnd@arndb.de (Arnd Bergmann)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 06/10] soc: Add SoC specific driver support for nuc900
Date: Mon, 11 Jul 2016 12:36:16 +0200	[thread overview]
Message-ID: <3879062.QodNaKgPKS@wuerfel> (raw)
In-Reply-To: <CAKT61h_vxcvVqqaDOn2XgtF7cBEpziSjfHRaY3eCWmM1ATfDXw@mail.gmail.com>

On Monday, July 11, 2016 6:28:57 PM CEST Wan ZongShun wrote:
> 2016-07-11 18:24 GMT+08:00 Arnd Bergmann <arnd@arndb.de>:
> > On Monday, July 11, 2016 5:07:01 PM CEST Wan Zongshun wrote:
> >>
> >> On 2016?07?11? 16:03, Arnd Bergmann wrote:
> >> > On Sunday, July 10, 2016 3:27:26 PM CEST Wan Zongshun wrote:
> >> >> +       ret = of_property_read_string(np, "compatible", &soc_dev_attr->soc_id);
> >> >> +       if (ret)
> >> >>                return -EINVAL;
> >> >> +
> >> >> +       soc_dev_attr->machine = "NUC900EVB";
> >> >> +       soc_dev_attr->family = "NUC900";
> >> >> +       soc_dev = soc_device_register(soc_dev_attr);
> >> >> +       if (IS_ERR(soc_dev)) {
> >> >> +               kfree(soc_dev_attr);
> >> >> +               return -ENODEV;
> >> >> +       }
> >> >> +
> >> >> +       ret = regmap_read(syscon_regmap, GCR_CHIPID, &nuc900_chipid);
> >> >> +       if (ret)
> >> >> +               return -ENODEV;
> >> >> +
> >> >> +       device_create_file(soc_device_to_device(soc_dev), &nuc900_chipid_attr);
> >> >> +       device_create_file(soc_device_to_device(soc_dev), &nuc900_version_attr);
> >> >> +
> >> >> +       dev_info(&pdev->dev, "Nuvoton Chip ID: 0x%x, Version ID:0x%x\n",
> >> >> +                nuc900_chipid & GCR_CHIPID_MASK,
> >> >> +                (nuc900_chipid >> 24) & 0xff);
> >> >
> >> > I'm still a bit unsure about the set of attributes here.
> >> >
> >> > - The "soc_id" is read from the device tree from the field that contains
> >> >    the board name, I think for consistency you should try to map the
> >> >    GCR_CHIPID to the name of the SoC and assign that here
> >>
> >> I will try to get chipid and map it to soc name like: ?nuc970?, "nuc910".
> >>
> >> And I will set this soc name to soc_id, ok?
> >
> > Ok.
> 
> Maybe I also can set versionid as soc name partly, like
> nuc970-version1,nuc970-version2? and then set the to soc_id, make
> sense?
> 

I didn't exactly understand what the suggestion is, maybe send that
as code so I see what you mean.

	Arnd

WARNING: multiple messages have this Message-ID (diff)
From: Arnd Bergmann <arnd@arndb.de>
To: Wan ZongShun <mcuos.com@gmail.com>
Cc: Wan Zongshun <vw@iommu.org>,
	linux-arm-kernel <linux-arm-kernel@lists.infradead.org>,
	Russell King <linux@armlinux.org.uk>,
	devicetree@vger.kernel.org, linux-clk@vger.kernel.org,
	Jason Cooper <jason@lakedaemon.net>,
	Daniel Lezcano <daniel.lezcano@linaro.org>,
	linux-kernel <linux-kernel@vger.kernel.org>,
	p.zabel@pengutronix.de, Thomas Gleixner <tglx@linutronix.de>
Subject: Re: [PATCH v2 06/10] soc: Add SoC specific driver support for nuc900
Date: Mon, 11 Jul 2016 12:36:16 +0200	[thread overview]
Message-ID: <3879062.QodNaKgPKS@wuerfel> (raw)
In-Reply-To: <CAKT61h_vxcvVqqaDOn2XgtF7cBEpziSjfHRaY3eCWmM1ATfDXw@mail.gmail.com>

On Monday, July 11, 2016 6:28:57 PM CEST Wan ZongShun wrote:
> 2016-07-11 18:24 GMT+08:00 Arnd Bergmann <arnd@arndb.de>:
> > On Monday, July 11, 2016 5:07:01 PM CEST Wan Zongshun wrote:
> >>
> >> On 2016年07月11日 16:03, Arnd Bergmann wrote:
> >> > On Sunday, July 10, 2016 3:27:26 PM CEST Wan Zongshun wrote:
> >> >> +       ret = of_property_read_string(np, "compatible", &soc_dev_attr->soc_id);
> >> >> +       if (ret)
> >> >>                return -EINVAL;
> >> >> +
> >> >> +       soc_dev_attr->machine = "NUC900EVB";
> >> >> +       soc_dev_attr->family = "NUC900";
> >> >> +       soc_dev = soc_device_register(soc_dev_attr);
> >> >> +       if (IS_ERR(soc_dev)) {
> >> >> +               kfree(soc_dev_attr);
> >> >> +               return -ENODEV;
> >> >> +       }
> >> >> +
> >> >> +       ret = regmap_read(syscon_regmap, GCR_CHIPID, &nuc900_chipid);
> >> >> +       if (ret)
> >> >> +               return -ENODEV;
> >> >> +
> >> >> +       device_create_file(soc_device_to_device(soc_dev), &nuc900_chipid_attr);
> >> >> +       device_create_file(soc_device_to_device(soc_dev), &nuc900_version_attr);
> >> >> +
> >> >> +       dev_info(&pdev->dev, "Nuvoton Chip ID: 0x%x, Version ID:0x%x\n",
> >> >> +                nuc900_chipid & GCR_CHIPID_MASK,
> >> >> +                (nuc900_chipid >> 24) & 0xff);
> >> >
> >> > I'm still a bit unsure about the set of attributes here.
> >> >
> >> > - The "soc_id" is read from the device tree from the field that contains
> >> >    the board name, I think for consistency you should try to map the
> >> >    GCR_CHIPID to the name of the SoC and assign that here
> >>
> >> I will try to get chipid and map it to soc name like: “nuc970”, "nuc910".
> >>
> >> And I will set this soc name to soc_id, ok?
> >
> > Ok.
> 
> Maybe I also can set versionid as soc name partly, like
> nuc970-version1,nuc970-version2? and then set the to soc_id, make
> sense?
> 

I didn't exactly understand what the suggestion is, maybe send that
as code so I see what you mean.

	Arnd

  reply	other threads:[~2016-07-11 10:36 UTC|newest]

Thread overview: 102+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-10  7:27 [PATCH v2 00/10] ARM: NUC900: Add NUC970 SoC support Wan Zongshun
2016-07-10  7:27 ` Wan Zongshun
2016-07-10  7:27 ` Wan Zongshun
2016-07-10  7:27 ` [PATCH v2 01/10] ARM: NUC900: Add nuc970 machine support Wan Zongshun
2016-07-10  7:27   ` Wan Zongshun
2016-07-10 22:11   ` Arnd Bergmann
2016-07-10 22:11     ` Arnd Bergmann
2016-07-11 16:04   ` Arnd Bergmann
2016-07-11 16:04     ` Arnd Bergmann
2016-07-11 16:04     ` Arnd Bergmann
2016-07-12  4:30     ` Wan Zongshun
2016-07-12  4:30       ` Wan Zongshun
2016-07-12  7:14       ` Wan Zongshun
2016-07-12  7:14         ` Wan Zongshun
2016-07-12  8:23         ` Arnd Bergmann
2016-07-12  8:23           ` Arnd Bergmann
2016-07-10  7:27 ` [PATCH v2 02/10] irqchip: add irqchip driver for nuc900 Wan Zongshun
2016-07-10  7:27   ` Wan Zongshun
2016-07-10  7:27   ` Wan Zongshun
2016-07-10 21:51   ` Paul Gortmaker
2016-07-10 21:51     ` Paul Gortmaker
2016-07-11  2:19     ` Wan Zongshun
2016-07-11  2:19       ` Wan Zongshun
2016-07-11 15:46   ` Arnd Bergmann
2016-07-11 15:46     ` Arnd Bergmann
2016-07-12  7:04     ` Wan Zongshun
2016-07-12  7:04       ` Wan Zongshun
2016-07-12  8:26       ` Arnd Bergmann
2016-07-12  8:26         ` Arnd Bergmann
2016-07-12  8:26         ` Arnd Bergmann
2016-07-14  8:52         ` Wan Zongshun
2016-07-14  8:52           ` Wan Zongshun
2016-07-14 11:09           ` Arnd Bergmann
2016-07-14 11:09             ` Arnd Bergmann
2016-07-13 20:09   ` Jason Cooper
2016-07-13 20:09     ` Jason Cooper
2016-07-13 20:09     ` Jason Cooper
2016-07-13 20:09     ` Jason Cooper
2016-07-14  3:36     ` Wan Zongshun
2016-07-14  3:36       ` Wan Zongshun
2016-07-14 13:54       ` Jason Cooper
2016-07-14 13:54         ` Jason Cooper
2016-07-15  5:15         ` Wan Zongshun
2016-07-15  5:15           ` Wan Zongshun
2016-07-15  7:00           ` Arnd Bergmann
2016-07-15  7:00             ` Arnd Bergmann
2016-07-15  9:44             ` Wan ZongShun
2016-07-15  9:44               ` Wan ZongShun
2016-07-15 10:02               ` Arnd Bergmann
2016-07-15 10:02                 ` Arnd Bergmann
2016-07-21 18:45                 ` Jason Cooper
2016-07-21 18:45                   ` Jason Cooper
2016-07-15 15:45               ` Jason Cooper
2016-07-15 15:45                 ` Jason Cooper
2016-07-10  7:27 ` [PATCH v2 03/10] Clocksource: add nuc970 clocksource driver Wan Zongshun
2016-07-10  7:27   ` Wan Zongshun
2016-07-11 15:36   ` Arnd Bergmann
2016-07-11 15:36     ` Arnd Bergmann
2016-07-12  7:32     ` Wan Zongshun
2016-07-12  7:32       ` Wan Zongshun
2016-07-12  7:32       ` Wan Zongshun
2016-07-12  8:28       ` Arnd Bergmann
2016-07-12  8:28         ` Arnd Bergmann
2016-07-21 12:52         ` Daniel Lezcano
2016-07-21 12:52           ` Daniel Lezcano
2016-07-21 12:54           ` Arnd Bergmann
2016-07-21 12:54             ` Arnd Bergmann
2016-07-21 12:54             ` Arnd Bergmann
2016-07-10  7:27 ` [PATCH v2 04/10] clk: add Clock driver for nuc970 Wan Zongshun
2016-07-10  7:27   ` Wan Zongshun
2016-07-11 22:14   ` Michael Turquette
2016-07-11 22:14     ` Michael Turquette
2016-07-11 22:14     ` Michael Turquette
2016-07-11 22:14     ` Michael Turquette
2016-07-10  7:27 ` [PATCH v2 05/10] power/reset: Add reset driver support for nuc900 Wan Zongshun
2016-07-10  7:27   ` Wan Zongshun
2016-07-10 21:56   ` Paul Gortmaker
2016-07-10 21:56     ` Paul Gortmaker
2016-07-11  2:30     ` Wan Zongshun
2016-07-11  2:30       ` Wan Zongshun
2016-07-11  2:58       ` Paul Gortmaker
2016-07-11  2:58         ` Paul Gortmaker
2016-07-11  2:58         ` Paul Gortmaker
2016-07-10  7:27 ` [PATCH v2 06/10] soc: Add SoC specific " Wan Zongshun
2016-07-10  7:27   ` Wan Zongshun
2016-07-11  8:03   ` Arnd Bergmann
2016-07-11  8:03     ` Arnd Bergmann
2016-07-11  9:07     ` Wan Zongshun
2016-07-11  9:07       ` Wan Zongshun
2016-07-11 10:24       ` Arnd Bergmann
2016-07-11 10:24         ` Arnd Bergmann
2016-07-11 10:28         ` Wan ZongShun
2016-07-11 10:28           ` Wan ZongShun
2016-07-11 10:36           ` Arnd Bergmann [this message]
2016-07-11 10:36             ` Arnd Bergmann
2016-07-11 10:36             ` Arnd Bergmann
2016-07-12  9:06     ` Wan Zongshun
2016-07-12  9:06       ` Wan Zongshun
2016-07-12  9:50       ` Arnd Bergmann
2016-07-12  9:50         ` Arnd Bergmann
2016-07-10  7:27 ` [PATCH v2 07/10] ARM: dts: Add clock header file into dt-bindings Wan Zongshun
2016-07-10  7:27   ` Wan Zongshun

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3879062.QodNaKgPKS@wuerfel \
    --to=arnd@arndb.de \
    --cc=daniel.lezcano@linaro.org \
    --cc=devicetree@vger.kernel.org \
    --cc=jason@lakedaemon.net \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=mcuos.com@gmail.com \
    --cc=p.zabel@pengutronix.de \
    --cc=tglx@linutronix.de \
    --cc=vw@iommu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.