Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933184AbbD1JWk (ORCPT ); Tue, 28 Apr 2015 05:22:40 -0400 Received: from mail1.asahi-net.or.jp ([202.224.39.197]:30096 "EHLO mail1.asahi-net.or.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932289AbbD1JWi (ORCPT ); Tue, 28 Apr 2015 05:22:38 -0400 Date: Tue, 28 Apr 2015 18:22:35 +0900 Message-ID: <87egn4vc84.wl-ysato@users.sourceforge.jp> From: Yoshinori Sato To: Arnd Bergmann Cc: linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org Subject: Re: [PATCH v9 06/17] h8300: CPU depend helpers In-Reply-To: <6023810.QeChDcReGk@wuerfel> References: <1430112924-1134-1-git-send-email-ysato@users.sourceforge.jp> <1430112924-1134-7-git-send-email-ysato@users.sourceforge.jp> <6023810.QeChDcReGk@wuerfel> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM/1.14.9 (=?ISO-8859-4?Q?Goj=F2?=) APEL/10.8 EasyPG/1.0.0 Emacs/24.4 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2128 Lines: 68 At Mon, 27 Apr 2015 10:54:24 +0200, Arnd Bergmann wrote: > > On Monday 27 April 2015 14:35:13 Yoshinori Sato wrote: > > +static struct platform_device sci0_device = { > > + .name = "sh-sci", > > + .id = 0, > > + .resource = sci0_resources, > > + .num_resources = ARRAY_SIZE(sci0_resources), > > + .dev = { > > + .platform_data = &sci0_platform_data, > > + }, > > +}; > > + > > +static struct platform_device sci1_device = { > > + .name = "sh-sci", > > + .id = 1, > > + .resource = sci1_resources, > > + .num_resources = ARRAY_SIZE(sci1_resources), > > + .dev = { > > + .platform_data = &sci1_platform_data, > > + }, > > +}; > > You should generally not define 'platform_device' structure statically. > Generally, all new architectures should pass a dtb blob from the > boot loader that contains the device definitions outside of the > kernel binary. > > If you don't expect to use h8300 with a lot of external peripherals, > you can also use platform_device_register_simple() and related functions > to register the platform device here, which lets you remove the > static definition. OK. > > +void __init early_device_init(void) > > +{ > > + early_platform_add_devices(early_devices, > > + ARRAY_SIZE(early_devices)); > > +} > > I would like to eventually remove the early_platform_add_devices() > interface, and use some other mechanism here. Can you try either using > devicetree to probe those devices like ARM does, or just calling into > the drivers manually? I think it's better to do after a while to DT, so it's considered. > In case of the sci, using the new 'earlycon' framework is probably the > best idea, and for the timer, just call the probe() function directly > instead of going through the whole early_platform_add_devices > and early_platform_driver_probe() dance. > > Arnd > OK. Thanks. -- Yoshinori Sato -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/