From: René Rebe Subject: [PATCH] MIPS: ip32: register the VICE accelerator platform device Add the SGI O2 Video Image Compression Engine at 0x17000000 with its CRIME interrupt, for the sgi-vice driver. Signed-off-by: René Rebe --- --- a/arch/mips/sgi-ip32/ip32-platform.c +++ b/arch/mips/sgi-ip32/ip32-platform.c @@ -92,6 +93,27 @@ static __init int sgio2btns_devinit(void device_initcall(sgio2btns_devinit); +#define VICE_BASE 0x17000000 + +static __init int sgio2vice_devinit(void) +{ + struct resource res[] = { + DEFINE_RES_MEM(VICE_BASE, 0x10000), + DEFINE_RES_IRQ(CRIME_VICE_IRQ), + }; + struct platform_device_info info = { + .name = "sgi-vice", + .id = PLATFORM_DEVID_NONE, + .res = res, + .num_res = ARRAY_SIZE(res), + .dma_mask = DMA_BIT_MASK(32), + }; + + return PTR_ERR_OR_ZERO(platform_device_register_full(&info)); +} + +device_initcall(sgio2vice_devinit); + #define MACE_RTC_RES_START (MACE_BASE + offsetof(struct sgi_mace, isa.rtc)) #define MACE_RTC_RES_END (MACE_RTC_RES_START + 32767)