util: swap the old ucp etc 'sd' 32MB shifts for a simple bias
authorAlan Cox <alan@linux.intel.com>
Fri, 22 May 2015 22:24:27 +0000 (23:24 +0100)
committerAlan Cox <alan@linux.intel.com>
Fri, 22 May 2015 22:24:27 +0000 (23:24 +0100)
We don't use the SocZ80 UZI 32MB block scheme, so repurpose it for general
use

Standalone/util.c

index 5e82031..657a993 100644 (file)
@@ -18,18 +18,18 @@ extern int swizzling;
 int fd_open(char *name)
 {
        char *namecopy, *sd;
-       int subdev = 0;
+       int bias = 0;
 
        namecopy = strdup(name);
        sd = index(namecopy, ':');
        if (sd) {
                *sd = 0;
                sd++;
-               subdev = atoi(sd);
+               bias = atoi(sd);
        }
 
-       printf("Opening %s sd%d\n", namecopy, subdev);
-       dev_offset = subdev << 25;      // * 32MB
+       printf("Opening %s (offset %d)\n", namecopy, bias);
+       dev_offset = bias;
        dev_fd = open(namecopy, O_RDWR | O_CREAT, 0666);
        free(namecopy);