aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@g5.osdl.org>2005-11-02 00:32:14 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2005-11-02 00:32:14 -0500
commit7f36b1e9582c06d0ddef5f2416c9b17017647d1f (patch)
treef83cbcef623476b9b8a14f7a0cc66eb92552a651 /Documentation
parent0e016b9fa134d79341cca5e336ccbcea066d5f81 (diff)
parent73ee723e4c6d179c2e9496cc4caf160a18d95603 (diff)
Merge master.kernel.org:/home/rmk/linux-2.6-arm
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/arm/Samsung-S3C24XX/Overview.txt41
1 files changed, 40 insertions, 1 deletions
diff --git a/Documentation/arm/Samsung-S3C24XX/Overview.txt b/Documentation/arm/Samsung-S3C24XX/Overview.txt
index 3af4d29a8938..89aa89d526ac 100644
--- a/Documentation/arm/Samsung-S3C24XX/Overview.txt
+++ b/Documentation/arm/Samsung-S3C24XX/Overview.txt
@@ -81,7 +81,8 @@ Adding New Machines
81 81
82 Any large scale modifications, or new drivers should be discussed 82 Any large scale modifications, or new drivers should be discussed
83 on the ARM kernel mailing list (linux-arm-kernel) before being 83 on the ARM kernel mailing list (linux-arm-kernel) before being
84 attempted. 84 attempted. See http://www.arm.linux.org.uk/mailinglists/ for the
85 mailing list information.
85 86
86 87
87NAND 88NAND
@@ -120,6 +121,43 @@ Clock Management
120 various clock units 121 various clock units
121 122
122 123
124Platform Data
125-------------
126
127 Whenever a device has platform specific data that is specified
128 on a per-machine basis, care should be taken to ensure the
129 following:
130
131 1) that default data is not left in the device to confuse the
132 driver if a machine does not set it at startup
133
134 2) the data should (if possible) be marked as __initdata,
135 to ensure that the data is thrown away if the machine is
136 not the one currently in use.
137
138 The best way of doing this is to make a function that
139 kmalloc()s an area of memory, and copies the __initdata
140 and then sets the relevant device's platform data. Making
141 the function `__init` takes care of ensuring it is discarded
142 with the rest of the initialisation code
143
144 static __init void s3c24xx_xxx_set_platdata(struct xxx_data *pd)
145 {
146 struct s3c2410_xxx_mach_info *npd;
147
148 npd = kmalloc(sizeof(struct s3c2410_xxx_mach_info), GFP_KERNEL);
149 if (npd) {
150 memcpy(npd, pd, sizeof(struct s3c2410_xxx_mach_info));
151 s3c_device_xxx.dev.platform_data = npd;
152 } else {
153 printk(KERN_ERR "no memory for xxx platform data\n");
154 }
155 }
156
157 Note, since the code is marked as __init, it should not be
158 exported outside arch/arm/mach-s3c2410/, or exported to
159 modules via EXPORT_SYMBOL() and related functions.
160
123Port Contributors 161Port Contributors
124----------------- 162-----------------
125 163
@@ -149,6 +187,7 @@ Document Changes
149 06 Mar 2005 - BJD - Added Christer Weinigel 187 06 Mar 2005 - BJD - Added Christer Weinigel
150 08 Mar 2005 - BJD - Added LCVR to list of people, updated introduction 188 08 Mar 2005 - BJD - Added LCVR to list of people, updated introduction
151 08 Mar 2005 - BJD - Added section on adding machines 189 08 Mar 2005 - BJD - Added section on adding machines
190 09 Sep 2005 - BJD - Added section on platform data
152 191
153Document Author 192Document Author
154--------------- 193---------------