Re: [PATCH v9 1/3] m68k: amiga/pcmcia - add 16 bit detection interface to amipcmcia.h

Geert Uytterhoeven
2021-11-09T08:14:36Z

Hi Michael,

On Tue, Nov 9, 2021 at 5:03 AM Michael Schmitz <schmitzmic@gmail.com> wrote:
> Add the interface definition for 16 bit card autoprobing (using
> the generic PCMCIA cftable entry parser) to amipcmcia.h for use
> by apne.c. Include necessary cftable definitions from cistpl.h,
> remove locally duplicate definitions from amipcmcia.h.
>
> Signed-off-by: Michael Schmitz <schmitzmic@gmail.com>
>
> --
>
> Changes from v8:
>
> Geert Uytterhoeven:
>
> - just include pcmcia/cistpl.h; declare pcmcia_parse_tuple()
> only if core PCMCIA code is included

Thanks for the update!

> --- a/arch/m68k/include/asm/amipcmcia.h
> +++ b/arch/m68k/include/asm/amipcmcia.h
> @@ -13,6 +13,7 @@
> #ifndef __AMIGA_PCMCIA_H__
> #define __AMIGA_PCMCIA_H__
>
> +#include <pcmcia/cistpl.h>
> #include <asm/amigayle.h>
>
> /* prototypes */
> @@ -64,47 +65,8 @@ static inline void pcmcia_disable_irq(void)
> #define PCMCIA_SPEED_250NS 250
> #define PCMCIA_SPEED_720NS 720
>
> -/* PCMCIA Tuple codes */
> -
> -#define CISTPL_NULL 0x00
> -#define CISTPL_DEVICE 0x01
> -#define CISTPL_LONGLINK_CB 0x02
> -#define CISTPL_CONFIG_CB 0x04
> -#define CISTPL_CFTABLE_ENTRY_CB 0x05
> -#define CISTPL_LONGLINK_MFC 0x06
> -#define CISTPL_BAR 0x07
> -#define CISTPL_CHECKSUM 0x10
> -#define CISTPL_LONGLINK_A 0x11
> -#define CISTPL_LONGLINK_C 0x12
> -#define CISTPL_LINKTARGET 0x13
> -#define CISTPL_NO_LINK 0x14
> -#define CISTPL_VERS_1 0x15
> -#define CISTPL_ALTSTR 0x16
> -#define CISTPL_DEVICE_A 0x17
> -#define CISTPL_JEDEC_C 0x18
> -#define CISTPL_JEDEC_A 0x19
> -#define CISTPL_CONFIG 0x1a
> -#define CISTPL_CFTABLE_ENTRY 0x1b
> -#define CISTPL_DEVICE_OC 0x1c
> -#define CISTPL_DEVICE_OA 0x1d
> -#define CISTPL_DEVICE_GEO 0x1e
> -#define CISTPL_DEVICE_GEO_A 0x1f
> -#define CISTPL_MANFID 0x20
> -#define CISTPL_FUNCID 0x21
> -#define CISTPL_FUNCE 0x22
> -#define CISTPL_SWIL 0x23
> -#define CISTPL_END 0xff
> -
> -/* FUNCID */
> -
> -#define CISTPL_FUNCID_MULTI 0x00
> -#define CISTPL_FUNCID_MEMORY 0x01
> -#define CISTPL_FUNCID_SERIAL 0x02
> -#define CISTPL_FUNCID_PARALLEL 0x03
> -#define CISTPL_FUNCID_FIXED 0x04
> -#define CISTPL_FUNCID_VIDEO 0x05
> -#define CISTPL_FUNCID_NETWORK 0x06
> -#define CISTPL_FUNCID_AIMS 0x07
> -#define CISTPL_FUNCID_SCSI 0x08
> +#if IS_ENABLED(CONFIG_PCMCIA)
> +extern int pcmcia_parse_tuple(tuple_t *cftuple, cisparse_t *cfparse);
> +#endif

Why the #ifdef? Can't it be defined unconditionally?

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