Hello,

I am working on i.MX31 based Board with BSP from Freescale. Linux is working
well on our board, everything works fine. So I tried to port WinCE 6.0 on our
board.
Now I have the following problem under Linux we added for the GPIOs the
following definition:
(mx31_pins.h)
MX31_PIN_GPIO1_28 = _MXC_BUILD_GPIO_PIN(0, 28, 79, 0, 107, 0),

and we changed (I now it is very dirty *g*) (mx31ads.c):
static int __init _mxc_expio_init(void)
{
/*
CHD: FIXME
dirty hack used expio routine for ethernet IRQ!
*/
int i;

initialized = 1;

/* printk(KERN_INFO "MX31ADS EXPIO(CPLD) hardware\n");*/
printk("\n\nEnable Interrupt for Ethernet\n\n");
/*
* Configure INT line as GPIO input
*/
//CHD changed GPIO1_4 to 1_28 for Ethernet IRQ
mxc_request_iomux(MX31_PIN_GPIO1_28, OUTPUTCONFIG_GPIO,
INPUTCONFIG_GPIO);
mxc_set_gpio_direction(MX31_PIN_GPIO1_28, 1);

set_irq_type(MXC_ETH_IRQ, IRQT_RISING);

//set_irq_chained_handler(MXC_ETH_IRQ, mxc_expio_irq_handler);
/* disable the interrupt and clear the status */
//__raw_writew(0xFFFF, PBC_INTMASK_CLEAR_REG);
//__raw_writew(0xFFFF, PBC_INTSTATUS_REG);
/*for (i = MXC_EXP_IO_BASE; i < (MXC_EXP_IO_BASE + MXC_MAX_EXP_IO_LINES);
i++) {
set_irq_chip(i, &expio_irq_chip);
set_irq_handler(i, do_level_IRQ);
set_irq_flags(i, IRQF_VALID);
}
set_irq_type(EXPIO_PARENT_INT, IRQT_HIGH);
set_irq_chained_handler(EXPIO_PARENT_INT, mxc_expio_irq_handler);
*/
return 0;
}

Now I need to know how to change this settings:
MX31_PIN_GPIO1_28 = _MXC_BUILD_GPIO_PIN(0, 28, 79, 0, 107, 0),

so that it is compatible with the definitions under WinCE 6.0:
for example
DDK_IOMUX_PIN_GPIO1_2 = (2536),
DDK_IOMUX_PIN_GPIO1_1 = (2544),
DDK_IOMUX_PIN_GPIO1_0 = (2552),

I hope somebody could help me
Thanks

Re: Porting from linux BSP to WinCE 6.0 BSP by Silver

Silver
Wed Aug 20 09:41:29 PDT 2008

You have not actually asked a question.
Do you want to change the pin muxing? If so you can do that, usually in the
bootloader and/or in the OAL. I'd be surprised is it were not already done
in both places on your BSP. Search the BSP code for some appropriate strings
(mux maybe?)

BTW: IRQs on CE work in a completely different manner to Linux.

Geoff
--