summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libbsp/powerpc/shared/startup/bsppredriverhook.c
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2015-12-09 11:43:49 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2015-12-10 08:32:37 +0100
commite7545f1b40a7e060fe54264af87429bcf927d4b5 (patch)
tree537411ed3e7fef4a07bde456ad1e54ebf0928d17 /c/src/lib/libbsp/powerpc/shared/startup/bsppredriverhook.c
parentbsps/bfin: Use default bsp_pretasking_hook() (diff)
downloadrtems-e7545f1b40a7e060fe54264af87429bcf927d4b5.tar.bz2
bsps/powerpc: Use default bsp_pretasking_hook()
Update #2408.
Diffstat (limited to '')
-rw-r--r--c/src/lib/libbsp/powerpc/shared/startup/bsppredriverhook.c (renamed from c/src/lib/libbsp/powerpc/shared/startup/pretaskinghook.c)17
1 files changed, 11 insertions, 6 deletions
diff --git a/c/src/lib/libbsp/powerpc/shared/startup/pretaskinghook.c b/c/src/lib/libbsp/powerpc/shared/startup/bsppredriverhook.c
index dbdf80e758..fc3916eadf 100644
--- a/c/src/lib/libbsp/powerpc/shared/startup/pretaskinghook.c
+++ b/c/src/lib/libbsp/powerpc/shared/startup/bsppredriverhook.c
@@ -1,6 +1,6 @@
/*
- * bsp_pretasking_hook().
- * Initializes the heap, libc and VME.
+ * bsp_predriver_hook().
+ * Optionally initializes I2C and VME.
*/
/*
@@ -28,10 +28,10 @@
#endif
/*
- * bsp_pretasking_hook
+ * bsp_predriver_hook
*
* Description:
- * BSP pretasking hook. Called just before drivers are initialized.
+ * BSP predriver hook. Called just before drivers are initialized.
*
* NOTES:
* Must not use libc (to do io) from here, since drivers are
@@ -39,8 +39,13 @@
*
*/
-void bsp_pretasking_hook(void)
+void bsp_predriver_hook(void)
{
+#ifdef BSP_PREDRIVER_I2C_INIT
+ /* Some drivers (RTC) may need i2c */
+ BSP_i2c_initialize();
+#endif
+
/* Note that VME support may be omitted also by
* providing a no-op BSP_vme_config routine
*/
@@ -60,6 +65,6 @@ void bsp_pretasking_hook(void)
#endif
#ifdef SHOW_MORE_INIT_SETTINGS
- printk("Leaving bsp_pretasking_hook\n");
+ printk("Leaving bsp_predriver_hook\n");
#endif
}