diff --git a/arch/arm/mach-omap2/board-am335xevm.c b/arch/arm/mach-omap2/board-am335xevm.c index 031edd9..e87711e 100644 --- a/arch/arm/mach-omap2/board-am335xevm.c +++ b/arch/arm/mach-omap2/board-am335xevm.c @@ -2064,6 +2064,12 @@ static void clkout2_enable(int evm_id, int profile) setup_pin_mux(clkout2_pin_mux); } +static void sgx_init(int evm_id, int profile) +{ + if (omap3_has_sgx()) { + am33xx_gpu_init(); + } +} /* General Purpose EVM */ static struct evm_dev_cfg gen_purp_evm_dev_cfg[] = { {am335x_rtc_init, DEV_ON_BASEBOARD, PROFILE_ALL}, @@ -2098,6 +2104,7 @@ static struct evm_dev_cfg gen_purp_evm_dev_cfg[] = { {volume_keys_init, DEV_ON_DGHTR_BRD, PROFILE_0}, {uart2_init, DEV_ON_DGHTR_BRD, PROFILE_3}, {haptics_init, DEV_ON_DGHTR_BRD, (PROFILE_4)}, + {sgx_init, DEV_ON_BASEBOARD, PROFILE_ALL}, {NULL, 0, 0}, }; @@ -2126,6 +2133,7 @@ static struct evm_dev_cfg beaglebone_old_dev_cfg[] = { {usb1_init, DEV_ON_BASEBOARD, PROFILE_NONE}, {mmc0_init, DEV_ON_BASEBOARD, PROFILE_NONE}, {i2c2_init, DEV_ON_BASEBOARD, PROFILE_NONE}, + {sgx_init, DEV_ON_BASEBOARD, PROFILE_NONE}, {NULL, 0, 0}, }; @@ -2139,6 +2147,7 @@ static struct evm_dev_cfg beaglebone_dev_cfg[] = { {usb1_init, DEV_ON_BASEBOARD, PROFILE_NONE}, {mmc0_init, DEV_ON_BASEBOARD, PROFILE_NONE}, {i2c2_init, DEV_ON_BASEBOARD, PROFILE_NONE}, + {sgx_init, DEV_ON_BASEBOARD, PROFILE_NONE}, {NULL, 0, 0}, }; @@ -2159,6 +2168,7 @@ static struct evm_dev_cfg evm_sk_dev_cfg[] = { {uart1_wl12xx_init, DEV_ON_BASEBOARD, PROFILE_ALL}, {wl12xx_init, DEV_ON_BASEBOARD, PROFILE_ALL}, {gpio_ddr_vtt_enb_init, DEV_ON_BASEBOARD, PROFILE_ALL}, + {sgx_init, DEV_ON_BASEBOARD, PROFILE_ALL}, {NULL, 0, 0}, }; diff --git a/arch/arm/mach-omap2/devices.c b/arch/arm/mach-omap2/devices.c index b930698..85dafbe 100644 --- a/arch/arm/mach-omap2/devices.c +++ b/arch/arm/mach-omap2/devices.c @@ -1455,3 +1455,23 @@ int __init omap_init_gpmc(struct gpmc_devices_info *pdata, int pdata_len) return 0; } + +void __init am33xx_gpu_init(void) +{ + int id = -1; + struct platform_device *pdev; + struct omap_hwmod *oh; + char *oh_name = "gfx"; + char *dev_name = "pvrsrvkm"; + + oh = omap_hwmod_lookup(oh_name); + if (!oh) { + pr_err("Could not find %s hwmod data\n", oh_name); + return; + } + + pdev = omap_device_build(dev_name, id, oh, NULL, 0, NULL, 0, 0); + + WARN(IS_ERR(pdev), "could not build omap_device for %s\n", oh_name); + +} diff --git a/arch/arm/mach-omap2/devices.h b/arch/arm/mach-omap2/devices.h index 65dd439..3f8d923 100644 --- a/arch/arm/mach-omap2/devices.h +++ b/arch/arm/mach-omap2/devices.h @@ -23,5 +23,6 @@ extern int __init am33xx_register_ecap(int id, extern int __init am33xx_register_ehrpwm(int id, struct pwmss_platform_data *pdata); extern int __init omap_init_elm(void); +extern void __init am33xx_gpu_init(void); #endif