Porting Notice.

1. Make sure the GPIO is work, and check the smi.c for the GPIO pin assignment for switch reset & I2C CLK & DATA.
#define GPIO_I2C_CLOCK	0
#define GPIO_I2C_DATA	1
#define GPIO_RESET_SWITCH  29

2. Then check the DELAY in smi.c which is for i2c delay used, normally the I2C clk with 2MHz should be fine.
   Usually, you don't need to modify this value.
#define DELAY    20

3. the following delay setting is important for switch & main cpu's MII,
   if not correct, cpu can't tx/rx any packets.
   and it is board depend, ask hw for correct values.
   
Defined in rtl8367.c
#define DELAY_TX 0//(valid value 0,1)
#define DELAY_RX 3//(valid value 0~7)

4. Implement the gpio function.
   Note, the realtek switch code here is a kernel module.
   You need to port following 3 functions in your platform.
   ralink_gpio_xxx() is in kernel/drivers/char/ralink_gpio.c

static rtk_int32 _rtl865x_initGpioPin(gpioID id, int peri, int direction, int interrupt)
{
	if (direction) ralink_gpio_set_output(id);
	else           ralink_gpio_set_input(id);
	return RT_ERR_OK;
}
static void _rtl865x_setGpioDataBit(gpioID id, rtk_uint32 val)
{
	if (val) ralink_gpio_set(id);
	else     ralink_gpio_reset(id);
}
static void _rtl865x_getGpioDataBit(gpioID id, rtk_uint32 * val)
{
	*val = (ralink_gpio_get(id) > 0) ? 1:0;
}