public inbox for linuxppc-dev@ozlabs.org 
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb•de>
To: linuxppc-dev@ozlabs•org
Cc: paulus@samba•org
Subject: Re: [PATCH 2/3] celleb: add supporting for native CBE
Date: Tue, 4 Dec 2007 14:21:46 +0100	[thread overview]
Message-ID: <200712041421.47378.arnd@arndb.de> (raw)
In-Reply-To: <20071204.173824.-1350527485.kouish@swc.toshiba.co.jp>

On Tuesday 04 December 2007, Ishizaki Kou wrote:
> This patch adds supporting for native CBE on Celleb. =A0Many codes in
> platforms/cell/ are used when native CBE environment.
>=20
> Signed-off-by: Kou Ishizaki <Kou.Ishizaki@toshiba•co.jp>

Ah, excellent to hear that this is now working!

I'd suggest doing the initialization in a different way, so that you don't
need to decide on so many attributes dynamically. The easiest way would
probably be to have two separate define_machine() calls in the celleb
definition, like

define_machine(celleb_beat) {
        .probe                  =3D celleb_probe_beat,
        .setup_arch             =3D celleb_setup_arch_native,
        .show_cpuinfo           =3D celleb_show_cpuinfo,
        .restart                =3D beat_restart,
        .power_off              =3D beat_power_off,
        .halt                   =3D beat_halt,
        .get_rtc_time           =3D beat_get_rtc_time,
        .set_rtc_time           =3D beat_set_rtc_time,
        .calibrate_decr         =3D generic_calibrate_decr,
        .progress               =3D celleb_progress,
        .power_save             =3D beat_power_save,
        .nvram_size             =3D beat_nvram_get_size,
        .nvram_read             =3D beat_nvram_read,
        .nvram_write            =3D beat_nvram_write,
        .set_dabr               =3D beat_set_xdabr,
        .init_IRQ               =3D beatic_init_IRQ,
        .get_irq                =3D beatic_get_irq,
        .pci_probe_mode         =3D celleb_pci_probe_mode,
        .pci_setup_phb          =3D celleb_setup_phb,
	...
};

define_machine(celleb_native) {
        .probe                  =3D celleb_probe_native,
        .setup_arch             =3D celleb_setup_arch_native,
        .show_cpuinfo           =3D celleb_show_cpuinfo,
        .restart                =3D rtas_restart,
        .power_off              =3D rtas_power_off,
        .halt                   =3D rtas_halt,
        .get_rtc_time           =3D rtas_get_rtc_time,
        .set_rtc_time           =3D rtas_set_rtc_time,
        .calibrate_decr         =3D generic_calibrate_decr,
        .progress               =3D celleb_progress,
        .init_IRQ               =3D celleb_init_IRQ_native,
        .get_irq                =3D celleb_get_irq_native,
        .pci_probe_mode         =3D celleb_pci_probe_mode,
        .pci_setup_phb          =3D celleb_setup_phb,
	...
};

=46or this, you can either have the two machine definitions in the
same celleb/setup.c, or split setup.c into machine specific files,
depending on how much ends up being shared in the end.

An interesting question still is how close the native celleb machine
definition is to the one from platforms/cell/setup.c. Maybe it's best
to have a common machine definition for these two in the end.

	Arnd <><

  reply	other threads:[~2007-12-04 13:21 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-12-04  8:38 [PATCH 2/3] celleb: add supporting for native CBE Ishizaki Kou
2007-12-04 13:21 ` Arnd Bergmann [this message]
2007-12-06  6:43   ` Ishizaki Kou
2007-12-06 10:21     ` Arnd Bergmann

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=200712041421.47378.arnd@arndb.de \
    --to=arnd@arndb$(echo .)de \
    --cc=linuxppc-dev@ozlabs$(echo .)org \
    --cc=paulus@samba$(echo .)org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox