lkml.org 
[lkml]   [2019]   [Jul]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Date
SubjectRe: [PATCH] m68k/mac: Revisit floppy disc controller base addresses
Hi Finn,

Thanks for your patch!

On Thu, Feb 14, 2019 at 11:22 PM Finn Thain <fthain@telegraphics.com.au> wrote:
> Rename floppy_type macros to make them more consistent with the scsi_type
> macros, which are named after classes of models with similar memory maps.
>
> The documentation for LC-class machines has the IO devices at offsets
> from $50F0 0000. Use these addresses (consistent with mac_scsi resources)
> because they may not be aliased elsewhere in the memory map, e.g. at
> offsets from $5000 0000.

I guess the others do have aliases at 0x50000000? ...

>
> Add comments with controller type information from 'Designing Cards and
> Drivers for the Macintosh Family', relevant Developer Notes and
> http://mess.redump.net/mess/driver_info/mac_technical_notes
>
> Adopt phys_addr_t to avoid type casts.
>
> Cc: Laurent Vivier <lvivier@redhat.com>
> Tested-by: Stan Johnson <userm57@yahoo.com>
> Signed-off-by: Finn Thain <fthain@telegraphics.com.au>
> Acked-by: Laurent Vivier <lvivier@redhat.com>

> --- a/arch/m68k/mac/config.c
> +++ b/arch/m68k/mac/config.c

> @@ -973,22 +973,22 @@ int __init mac_platform_init(void)
> */
>
> switch (macintosh_config->floppy_type) {
> - case MAC_FLOPPY_SWIM_ADDR1:
> - swim_base = (u8 *)(VIA1_BASE + 0x1E000);
> + case MAC_FLOPPY_QUADRA:
> + swim_base = 0x5001E000;
> break;
> - case MAC_FLOPPY_SWIM_ADDR2:
> - swim_base = (u8 *)(VIA1_BASE + 0x16000);
> + case MAC_FLOPPY_OLD:
> + swim_base = 0x50016000;

... so that's why you change them from 0x50fxxxxx to 0x500xxxxx?

If that is correct, please mention that in the patch description.

Thanks!

> break;
> - default:
> - swim_base = NULL;
> + case MAC_FLOPPY_LC:
> + swim_base = 0x50F16000;
> break;
> }
>
> if (swim_base) {
> struct resource swim_rsrc = {
> .flags = IORESOURCE_MEM,
> - .start = (resource_size_t)swim_base,
> - .end = (resource_size_t)swim_base + 0x1FFF,
> + .start = swim_base,
> + .end = swim_base + 0x1FFF,
> };
>
> platform_device_register_simple("swim", -1, &swim_rsrc, 1);

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds

\
 
 \ /
  Last update: 2019-07-08 09:27    [W:0.054 / U:0.704 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site