[PATCH 3/7] POWERPC: Move generic cpm2 stuff to powerpc
Stephen Rothwell
sfr at canb.auug.org.au
Sat Sep 16 18:36:07 EST 2006
Hi Vitaly,
Seems I am in nit picking mood tonight ..
On Fri, 15 Sep 2006 21:39:12 +0400 Vitaly Bordug <vbordug at ru.mvista.com> wrote:
>
> +# Temporary hack until we have migrated to asm-powerpc
> +ifeq ($(ARCH),powerpc)
I think we normally use:
ifeq ($(CONFIG_PPC_MERGE),y)
> + if (brg < 4) {
> + bp = (uint *)&cpm2_immr->im_brgc1;
> + }
> + else {
Normally:
if (brg < 4)
bp = (uint *)&cpm2_immr->im_brgc1;
else {
> +static u_char irq_to_siureg[] = {
const ?
> +static u_char irq_to_siubit[] = {
ditto
> +int cpm2_get_irq(struct pt_regs *regs)
> +{
> + int irq;
> + unsigned long bits;
> +
> + /* For CPM2, read the SIVEC register and shift the bits down
> + * to get the irq number. */
> + bits = cpm2_immr->im_intctl.ic_sivec;
> + irq = bits >> 26;
> +
> + if (irq == 0)
> + return(-1);
> + return irq+CPM_IRQ_OFFSET;
> +}
Indentation needs fixing - we use single tab characters to indent.
> +static int cpm2_pic_host_xlate(struct irq_host *h, struct device_node *ct,
> + u32 *intspec, unsigned int intsize,
> + irq_hw_number_t *out_hwirq, unsigned int *out_flags)
> +{
> + static unsigned char map_cpm2_senses[4] = {
const ?
--
Cheers,
Stephen Rothwell sfr at canb.auug.org.au
http://www.canb.auug.org.au/~sfr/
More information about the Linuxppc-dev
mailing list