
On Thu, Nov 07, 2013 at 09:32 -0700, Simon Glass wrote:
+Declaring Drivers +-----------------
+A driver declaration looks something like this (see +drivers/demo/demo-shape.c):
+static const struct demo_ops simple_ops = {
- .hello = shape_hello,
- .status = shape_status,
+};
+U_BOOT_DRIVER(demo_shape_drv) = {
- .name = "demo_shape_drv",
- .id = UCLASS_DEMO,
- .ops = &simple_ops,
- .priv_data_size = sizeof(struct shape_data),
+};
Should the variable 'simple_ops' be named 'shape_ops' or 'demo_shape_ops', to better reflect that it's the list of operations for the 'shape' driver which implements the 'demo' class API? Because 'simple' is found nowhere else in this example.
+Things to punt for later +------------------------
[ ... ]
+For pre-relocation we can simply call the driver model init function. Then +post relocation we throw that away and re-init driver model again. For drivers +which require some sort of continuity between pre- and post-relocation +devices, we can provide access to the pre-relocatoin device pointers.
s/relocatoin/relocation/
virtually yours Gerhard Sittig