[OpenBIOS] r299 - openbios-devel/drivers
svn at openbios.org
svn at openbios.org
Sat Dec 20 21:23:16 CET 2008
Author: blueswirl
Date: 2008-12-20 21:23:16 +0100 (Sat, 20 Dec 2008)
New Revision: 299
Modified:
openbios-devel/drivers/cuda.c
Log:
re-indent cuda_init()
This patch re-indents function cuda_init()
Signed-off-by: Laurent Vivier <Laurent at lvivier.info>
Modified: openbios-devel/drivers/cuda.c
===================================================================
--- openbios-devel/drivers/cuda.c 2008-12-20 20:22:17 UTC (rev 298)
+++ openbios-devel/drivers/cuda.c 2008-12-20 20:23:16 UTC (rev 299)
@@ -240,32 +240,36 @@
cuda_t *cuda_init (const char *path, uint32_t base)
{
- cuda_t *cuda;
- char buf[64];
+ cuda_t *cuda;
+ char buf[64];
+ phandle_t aliases;
- base += IO_CUDA_OFFSET;
- CUDA_DPRINTF(" base=%08x\n", base);
- cuda = malloc(sizeof(cuda_t));
- if (cuda == NULL)
- return NULL;
+ base += IO_CUDA_OFFSET;
+ CUDA_DPRINTF(" base=%08x\n", base);
+ cuda = malloc(sizeof(cuda_t));
+ if (cuda == NULL)
+ return NULL;
- snprintf(buf, sizeof(buf), "%s/via-cuda", path);
- REGISTER_NAMED_NODE(ob_cuda, buf);
+ snprintf(buf, sizeof(buf), "%s/via-cuda", path);
+ REGISTER_NAMED_NODE(ob_cuda, buf);
- cuda->base = base;
- cuda_writeb(cuda, B, cuda_readb(cuda, B) | TREQ | TIP);
+ aliases = find_dev("/aliases");
+ set_property(aliases, "via-cuda", buf, strlen(buf) + 1);
+
+ cuda->base = base;
+ cuda_writeb(cuda, B, cuda_readb(cuda, B) | TREQ | TIP);
#ifdef CONFIG_DRIVER_ADB
- cuda->adb_bus = adb_bus_new(cuda, &cuda_adb_req);
- if (cuda->adb_bus == NULL) {
- free(cuda);
- return NULL;
- }
- adb_bus_init(buf, cuda->adb_bus);
+ cuda->adb_bus = adb_bus_new(cuda, &cuda_adb_req);
+ if (cuda->adb_bus == NULL) {
+ free(cuda);
+ return NULL;
+ }
+ adb_bus_init(buf, cuda->adb_bus);
#endif
- rtc_init(buf);
+ rtc_init(buf);
- return cuda;
+ return cuda;
}
#ifdef CONFIG_DRIVER_ADB
More information about the OpenBIOS
mailing list