]> git.sur5r.net Git - u-boot/blobdiff - disk/part_mac.c
spi: omap3: Move headers code inside the driver
[u-boot] / disk / part_mac.c
index 74dc12fe58ac13f81027488993d507d86101969c..f3bc8dd55535b843850df201c534456a396a99a8 100644 (file)
@@ -2,23 +2,7 @@
  * (C) Copyright 2000
  * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
  *
- * See file CREDITS for list of people who contributed to this
- * project.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of
- * the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
- * MA 02111-1307 USA
+ * SPDX-License-Identifier:    GPL-2.0+
  */
 
 /*
@@ -31,6 +15,7 @@
 
 #include <common.h>
 #include <command.h>
+#include <memalign.h>
 #include <ide.h>
 #include "part_mac.h"
 
@@ -66,7 +51,8 @@ int test_part_mac (block_dev_desc_t *dev_desc)
 
        n = 1;  /* assuming at least one partition */
        for (i=1; i<=n; ++i) {
-               if ((dev_desc->block_read(dev_desc->dev, i, 1, (ulong *)mpart) != 1) ||
+               if ((dev_desc->block_read(dev_desc, i, 1,
+                                         (ulong *)mpart) != 1) ||
                    (mpart->signature != MAC_PARTITION_MAGIC) ) {
                        return (-1);
                }
@@ -119,7 +105,7 @@ void print_part_mac (block_dev_desc_t *dev_desc)
                char c;
 
                printf ("%4ld: ", i);
-               if (dev_desc->block_read (dev_desc->dev, i, 1, (ulong *)mpart) != 1) {
+               if (dev_desc->block_read(dev_desc, i, 1, (ulong *)mpart) != 1) {
                        printf ("** Can't read Partition Map on %d:%ld **\n",
                                dev_desc->dev, i);
                        return;
@@ -165,7 +151,7 @@ void print_part_mac (block_dev_desc_t *dev_desc)
  */
 static int part_mac_read_ddb (block_dev_desc_t *dev_desc, mac_driver_desc_t *ddb_p)
 {
-       if (dev_desc->block_read(dev_desc->dev, 0, 1, (ulong *)ddb_p) != 1) {
+       if (dev_desc->block_read(dev_desc, 0, 1, (ulong *)ddb_p) != 1) {
                printf ("** Can't read Driver Desriptor Block **\n");
                return (-1);
        }
@@ -193,7 +179,7 @@ static int part_mac_read_pdb (block_dev_desc_t *dev_desc, int part, mac_partitio
                 * partition 1 first since this is the only way to
                 * know how many partitions we have.
                 */
-               if (dev_desc->block_read (dev_desc->dev, n, 1, (ulong *)pdb_p) != 1) {
+               if (dev_desc->block_read(dev_desc, n, 1, (ulong *)pdb_p) != 1) {
                        printf ("** Can't read Partition Map on %d:%d **\n",
                                dev_desc->dev, n);
                        return (-1);