18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0-or-later */ 28c2ecf20Sopenharmony_ci/* 38c2ecf20Sopenharmony_ci * drivers/net/ethernet/ibm/emac/mal.h 48c2ecf20Sopenharmony_ci * 58c2ecf20Sopenharmony_ci * Memory Access Layer (MAL) support 68c2ecf20Sopenharmony_ci * 78c2ecf20Sopenharmony_ci * Copyright 2007 Benjamin Herrenschmidt, IBM Corp. 88c2ecf20Sopenharmony_ci * <benh@kernel.crashing.org> 98c2ecf20Sopenharmony_ci * 108c2ecf20Sopenharmony_ci * Based on the arch/ppc version of the driver: 118c2ecf20Sopenharmony_ci * 128c2ecf20Sopenharmony_ci * Copyright (c) 2004, 2005 Zultys Technologies. 138c2ecf20Sopenharmony_ci * Eugene Surovegin <eugene.surovegin@zultys.com> or <ebs@ebshome.net> 148c2ecf20Sopenharmony_ci * 158c2ecf20Sopenharmony_ci * Based on original work by 168c2ecf20Sopenharmony_ci * Armin Kuster <akuster@mvista.com> 178c2ecf20Sopenharmony_ci * Copyright 2002 MontaVista Softare Inc. 188c2ecf20Sopenharmony_ci */ 198c2ecf20Sopenharmony_ci#ifndef __IBM_NEWEMAC_MAL_H 208c2ecf20Sopenharmony_ci#define __IBM_NEWEMAC_MAL_H 218c2ecf20Sopenharmony_ci 228c2ecf20Sopenharmony_ci/* 238c2ecf20Sopenharmony_ci * There are some variations on the MAL, we express them in this driver as 248c2ecf20Sopenharmony_ci * MAL Version 1 and 2 though that doesn't match any IBM terminology. 258c2ecf20Sopenharmony_ci * 268c2ecf20Sopenharmony_ci * We call MAL 1 the version in 405GP, 405GPR, 405EP, 440EP, 440GR and 278c2ecf20Sopenharmony_ci * NP405H. 288c2ecf20Sopenharmony_ci * 298c2ecf20Sopenharmony_ci * We call MAL 2 the version in 440GP, 440GX, 440SP, 440SPE and Axon 308c2ecf20Sopenharmony_ci * 318c2ecf20Sopenharmony_ci * The driver expects a "version" property in the emac node containing 328c2ecf20Sopenharmony_ci * a number 1 or 2. New device-trees for EMAC capable platforms are thus 338c2ecf20Sopenharmony_ci * required to include that when porting to arch/powerpc. 348c2ecf20Sopenharmony_ci */ 358c2ecf20Sopenharmony_ci 368c2ecf20Sopenharmony_ci/* MALx DCR registers */ 378c2ecf20Sopenharmony_ci#define MAL_CFG 0x00 388c2ecf20Sopenharmony_ci#define MAL_CFG_SR 0x80000000 398c2ecf20Sopenharmony_ci#define MAL_CFG_PLBB 0x00004000 408c2ecf20Sopenharmony_ci#define MAL_CFG_OPBBL 0x00000080 418c2ecf20Sopenharmony_ci#define MAL_CFG_EOPIE 0x00000004 428c2ecf20Sopenharmony_ci#define MAL_CFG_LEA 0x00000002 438c2ecf20Sopenharmony_ci#define MAL_CFG_SD 0x00000001 448c2ecf20Sopenharmony_ci 458c2ecf20Sopenharmony_ci/* MAL V1 CFG bits */ 468c2ecf20Sopenharmony_ci#define MAL1_CFG_PLBP_MASK 0x00c00000 478c2ecf20Sopenharmony_ci#define MAL1_CFG_PLBP_10 0x00800000 488c2ecf20Sopenharmony_ci#define MAL1_CFG_GA 0x00200000 498c2ecf20Sopenharmony_ci#define MAL1_CFG_OA 0x00100000 508c2ecf20Sopenharmony_ci#define MAL1_CFG_PLBLE 0x00080000 518c2ecf20Sopenharmony_ci#define MAL1_CFG_PLBT_MASK 0x00078000 528c2ecf20Sopenharmony_ci#define MAL1_CFG_DEFAULT (MAL1_CFG_PLBP_10 | MAL1_CFG_PLBT_MASK) 538c2ecf20Sopenharmony_ci 548c2ecf20Sopenharmony_ci/* MAL V2 CFG bits */ 558c2ecf20Sopenharmony_ci#define MAL2_CFG_RPP_MASK 0x00c00000 568c2ecf20Sopenharmony_ci#define MAL2_CFG_RPP_10 0x00800000 578c2ecf20Sopenharmony_ci#define MAL2_CFG_RMBS_MASK 0x00300000 588c2ecf20Sopenharmony_ci#define MAL2_CFG_WPP_MASK 0x000c0000 598c2ecf20Sopenharmony_ci#define MAL2_CFG_WPP_10 0x00080000 608c2ecf20Sopenharmony_ci#define MAL2_CFG_WMBS_MASK 0x00030000 618c2ecf20Sopenharmony_ci#define MAL2_CFG_PLBLE 0x00008000 628c2ecf20Sopenharmony_ci#define MAL2_CFG_DEFAULT (MAL2_CFG_RMBS_MASK | MAL2_CFG_WMBS_MASK | \ 638c2ecf20Sopenharmony_ci MAL2_CFG_RPP_10 | MAL2_CFG_WPP_10) 648c2ecf20Sopenharmony_ci 658c2ecf20Sopenharmony_ci#define MAL_ESR 0x01 668c2ecf20Sopenharmony_ci#define MAL_ESR_EVB 0x80000000 678c2ecf20Sopenharmony_ci#define MAL_ESR_CIDT 0x40000000 688c2ecf20Sopenharmony_ci#define MAL_ESR_CID_MASK 0x3e000000 698c2ecf20Sopenharmony_ci#define MAL_ESR_CID_SHIFT 25 708c2ecf20Sopenharmony_ci#define MAL_ESR_DE 0x00100000 718c2ecf20Sopenharmony_ci#define MAL_ESR_OTE 0x00040000 728c2ecf20Sopenharmony_ci#define MAL_ESR_OSE 0x00020000 738c2ecf20Sopenharmony_ci#define MAL_ESR_PEIN 0x00010000 748c2ecf20Sopenharmony_ci#define MAL_ESR_DEI 0x00000010 758c2ecf20Sopenharmony_ci#define MAL_ESR_OTEI 0x00000004 768c2ecf20Sopenharmony_ci#define MAL_ESR_OSEI 0x00000002 778c2ecf20Sopenharmony_ci#define MAL_ESR_PBEI 0x00000001 788c2ecf20Sopenharmony_ci 798c2ecf20Sopenharmony_ci/* MAL V1 ESR bits */ 808c2ecf20Sopenharmony_ci#define MAL1_ESR_ONE 0x00080000 818c2ecf20Sopenharmony_ci#define MAL1_ESR_ONEI 0x00000008 828c2ecf20Sopenharmony_ci 838c2ecf20Sopenharmony_ci/* MAL V2 ESR bits */ 848c2ecf20Sopenharmony_ci#define MAL2_ESR_PTE 0x00800000 858c2ecf20Sopenharmony_ci#define MAL2_ESR_PRE 0x00400000 868c2ecf20Sopenharmony_ci#define MAL2_ESR_PWE 0x00200000 878c2ecf20Sopenharmony_ci#define MAL2_ESR_PTEI 0x00000080 888c2ecf20Sopenharmony_ci#define MAL2_ESR_PREI 0x00000040 898c2ecf20Sopenharmony_ci#define MAL2_ESR_PWEI 0x00000020 908c2ecf20Sopenharmony_ci 918c2ecf20Sopenharmony_ci 928c2ecf20Sopenharmony_ci#define MAL_IER 0x02 938c2ecf20Sopenharmony_ci/* MAL IER bits */ 948c2ecf20Sopenharmony_ci#define MAL_IER_DE 0x00000010 958c2ecf20Sopenharmony_ci#define MAL_IER_OTE 0x00000004 968c2ecf20Sopenharmony_ci#define MAL_IER_OE 0x00000002 978c2ecf20Sopenharmony_ci#define MAL_IER_PE 0x00000001 988c2ecf20Sopenharmony_ci 998c2ecf20Sopenharmony_ci/* PLB read/write/timeout errors */ 1008c2ecf20Sopenharmony_ci#define MAL_IER_PTE 0x00000080 1018c2ecf20Sopenharmony_ci#define MAL_IER_PRE 0x00000040 1028c2ecf20Sopenharmony_ci#define MAL_IER_PWE 0x00000020 1038c2ecf20Sopenharmony_ci 1048c2ecf20Sopenharmony_ci#define MAL_IER_SOC_EVENTS (MAL_IER_PTE | MAL_IER_PRE | MAL_IER_PWE) 1058c2ecf20Sopenharmony_ci#define MAL_IER_EVENTS (MAL_IER_SOC_EVENTS | MAL_IER_DE | \ 1068c2ecf20Sopenharmony_ci MAL_IER_OTE | MAL_IER_OE | MAL_IER_PE) 1078c2ecf20Sopenharmony_ci 1088c2ecf20Sopenharmony_ci#define MAL_TXCASR 0x04 1098c2ecf20Sopenharmony_ci#define MAL_TXCARR 0x05 1108c2ecf20Sopenharmony_ci#define MAL_TXEOBISR 0x06 1118c2ecf20Sopenharmony_ci#define MAL_TXDEIR 0x07 1128c2ecf20Sopenharmony_ci#define MAL_RXCASR 0x10 1138c2ecf20Sopenharmony_ci#define MAL_RXCARR 0x11 1148c2ecf20Sopenharmony_ci#define MAL_RXEOBISR 0x12 1158c2ecf20Sopenharmony_ci#define MAL_RXDEIR 0x13 1168c2ecf20Sopenharmony_ci#define MAL_TXCTPR(n) ((n) + 0x20) 1178c2ecf20Sopenharmony_ci#define MAL_RXCTPR(n) ((n) + 0x40) 1188c2ecf20Sopenharmony_ci#define MAL_RCBS(n) ((n) + 0x60) 1198c2ecf20Sopenharmony_ci 1208c2ecf20Sopenharmony_ci/* In reality MAL can handle TX buffers up to 4095 bytes long, 1218c2ecf20Sopenharmony_ci * but this isn't a good round number :) --ebs 1228c2ecf20Sopenharmony_ci */ 1238c2ecf20Sopenharmony_ci#define MAL_MAX_TX_SIZE 4080 1248c2ecf20Sopenharmony_ci#define MAL_MAX_RX_SIZE 4080 1258c2ecf20Sopenharmony_ci 1268c2ecf20Sopenharmony_cistatic inline int mal_rx_size(int len) 1278c2ecf20Sopenharmony_ci{ 1288c2ecf20Sopenharmony_ci len = (len + 0xf) & ~0xf; 1298c2ecf20Sopenharmony_ci return len > MAL_MAX_RX_SIZE ? MAL_MAX_RX_SIZE : len; 1308c2ecf20Sopenharmony_ci} 1318c2ecf20Sopenharmony_ci 1328c2ecf20Sopenharmony_cistatic inline int mal_tx_chunks(int len) 1338c2ecf20Sopenharmony_ci{ 1348c2ecf20Sopenharmony_ci return DIV_ROUND_UP(len, MAL_MAX_TX_SIZE); 1358c2ecf20Sopenharmony_ci} 1368c2ecf20Sopenharmony_ci 1378c2ecf20Sopenharmony_ci#define MAL_CHAN_MASK(n) (0x80000000 >> (n)) 1388c2ecf20Sopenharmony_ci 1398c2ecf20Sopenharmony_ci/* MAL Buffer Descriptor structure */ 1408c2ecf20Sopenharmony_cistruct mal_descriptor { 1418c2ecf20Sopenharmony_ci u16 ctrl; /* MAL / Commac status control bits */ 1428c2ecf20Sopenharmony_ci u16 data_len; /* Max length is 4K-1 (12 bits) */ 1438c2ecf20Sopenharmony_ci u32 data_ptr; /* pointer to actual data buffer */ 1448c2ecf20Sopenharmony_ci}; 1458c2ecf20Sopenharmony_ci 1468c2ecf20Sopenharmony_ci/* the following defines are for the MadMAL status and control registers. */ 1478c2ecf20Sopenharmony_ci/* MADMAL transmit and receive status/control bits */ 1488c2ecf20Sopenharmony_ci#define MAL_RX_CTRL_EMPTY 0x8000 1498c2ecf20Sopenharmony_ci#define MAL_RX_CTRL_WRAP 0x4000 1508c2ecf20Sopenharmony_ci#define MAL_RX_CTRL_CM 0x2000 1518c2ecf20Sopenharmony_ci#define MAL_RX_CTRL_LAST 0x1000 1528c2ecf20Sopenharmony_ci#define MAL_RX_CTRL_FIRST 0x0800 1538c2ecf20Sopenharmony_ci#define MAL_RX_CTRL_INTR 0x0400 1548c2ecf20Sopenharmony_ci#define MAL_RX_CTRL_SINGLE (MAL_RX_CTRL_LAST | MAL_RX_CTRL_FIRST) 1558c2ecf20Sopenharmony_ci#define MAL_IS_SINGLE_RX(ctrl) (((ctrl) & MAL_RX_CTRL_SINGLE) == MAL_RX_CTRL_SINGLE) 1568c2ecf20Sopenharmony_ci 1578c2ecf20Sopenharmony_ci#define MAL_TX_CTRL_READY 0x8000 1588c2ecf20Sopenharmony_ci#define MAL_TX_CTRL_WRAP 0x4000 1598c2ecf20Sopenharmony_ci#define MAL_TX_CTRL_CM 0x2000 1608c2ecf20Sopenharmony_ci#define MAL_TX_CTRL_LAST 0x1000 1618c2ecf20Sopenharmony_ci#define MAL_TX_CTRL_INTR 0x0400 1628c2ecf20Sopenharmony_ci 1638c2ecf20Sopenharmony_cistruct mal_commac_ops { 1648c2ecf20Sopenharmony_ci void (*poll_tx) (void *dev); 1658c2ecf20Sopenharmony_ci int (*poll_rx) (void *dev, int budget); 1668c2ecf20Sopenharmony_ci int (*peek_rx) (void *dev); 1678c2ecf20Sopenharmony_ci void (*rxde) (void *dev); 1688c2ecf20Sopenharmony_ci}; 1698c2ecf20Sopenharmony_ci 1708c2ecf20Sopenharmony_cistruct mal_commac { 1718c2ecf20Sopenharmony_ci struct mal_commac_ops *ops; 1728c2ecf20Sopenharmony_ci void *dev; 1738c2ecf20Sopenharmony_ci struct list_head poll_list; 1748c2ecf20Sopenharmony_ci long flags; 1758c2ecf20Sopenharmony_ci#define MAL_COMMAC_RX_STOPPED 0 1768c2ecf20Sopenharmony_ci#define MAL_COMMAC_POLL_DISABLED 1 1778c2ecf20Sopenharmony_ci u32 tx_chan_mask; 1788c2ecf20Sopenharmony_ci u32 rx_chan_mask; 1798c2ecf20Sopenharmony_ci struct list_head list; 1808c2ecf20Sopenharmony_ci}; 1818c2ecf20Sopenharmony_ci 1828c2ecf20Sopenharmony_cistruct mal_instance { 1838c2ecf20Sopenharmony_ci int version; 1848c2ecf20Sopenharmony_ci dcr_host_t dcr_host; 1858c2ecf20Sopenharmony_ci 1868c2ecf20Sopenharmony_ci int num_tx_chans; /* Number of TX channels */ 1878c2ecf20Sopenharmony_ci int num_rx_chans; /* Number of RX channels */ 1888c2ecf20Sopenharmony_ci int txeob_irq; /* TX End Of Buffer IRQ */ 1898c2ecf20Sopenharmony_ci int rxeob_irq; /* RX End Of Buffer IRQ */ 1908c2ecf20Sopenharmony_ci int txde_irq; /* TX Descriptor Error IRQ */ 1918c2ecf20Sopenharmony_ci int rxde_irq; /* RX Descriptor Error IRQ */ 1928c2ecf20Sopenharmony_ci int serr_irq; /* MAL System Error IRQ */ 1938c2ecf20Sopenharmony_ci 1948c2ecf20Sopenharmony_ci struct list_head poll_list; 1958c2ecf20Sopenharmony_ci struct napi_struct napi; 1968c2ecf20Sopenharmony_ci 1978c2ecf20Sopenharmony_ci struct list_head list; 1988c2ecf20Sopenharmony_ci u32 tx_chan_mask; 1998c2ecf20Sopenharmony_ci u32 rx_chan_mask; 2008c2ecf20Sopenharmony_ci 2018c2ecf20Sopenharmony_ci dma_addr_t bd_dma; 2028c2ecf20Sopenharmony_ci struct mal_descriptor *bd_virt; 2038c2ecf20Sopenharmony_ci 2048c2ecf20Sopenharmony_ci struct platform_device *ofdev; 2058c2ecf20Sopenharmony_ci int index; 2068c2ecf20Sopenharmony_ci spinlock_t lock; 2078c2ecf20Sopenharmony_ci 2088c2ecf20Sopenharmony_ci struct net_device dummy_dev; 2098c2ecf20Sopenharmony_ci 2108c2ecf20Sopenharmony_ci unsigned int features; 2118c2ecf20Sopenharmony_ci}; 2128c2ecf20Sopenharmony_ci 2138c2ecf20Sopenharmony_cistatic inline u32 get_mal_dcrn(struct mal_instance *mal, int reg) 2148c2ecf20Sopenharmony_ci{ 2158c2ecf20Sopenharmony_ci return dcr_read(mal->dcr_host, reg); 2168c2ecf20Sopenharmony_ci} 2178c2ecf20Sopenharmony_ci 2188c2ecf20Sopenharmony_cistatic inline void set_mal_dcrn(struct mal_instance *mal, int reg, u32 val) 2198c2ecf20Sopenharmony_ci{ 2208c2ecf20Sopenharmony_ci dcr_write(mal->dcr_host, reg, val); 2218c2ecf20Sopenharmony_ci} 2228c2ecf20Sopenharmony_ci 2238c2ecf20Sopenharmony_ci/* Features of various MAL implementations */ 2248c2ecf20Sopenharmony_ci 2258c2ecf20Sopenharmony_ci/* Set if you have interrupt coalescing and you have to clear the SDR 2268c2ecf20Sopenharmony_ci * register for TXEOB and RXEOB interrupts to work 2278c2ecf20Sopenharmony_ci */ 2288c2ecf20Sopenharmony_ci#define MAL_FTR_CLEAR_ICINTSTAT 0x00000001 2298c2ecf20Sopenharmony_ci 2308c2ecf20Sopenharmony_ci/* Set if your MAL has SERR, TXDE, and RXDE OR'd into a single UIC 2318c2ecf20Sopenharmony_ci * interrupt 2328c2ecf20Sopenharmony_ci */ 2338c2ecf20Sopenharmony_ci#define MAL_FTR_COMMON_ERR_INT 0x00000002 2348c2ecf20Sopenharmony_ci 2358c2ecf20Sopenharmony_cienum { 2368c2ecf20Sopenharmony_ci MAL_FTRS_ALWAYS = 0, 2378c2ecf20Sopenharmony_ci 2388c2ecf20Sopenharmony_ci MAL_FTRS_POSSIBLE = 2398c2ecf20Sopenharmony_ci#ifdef CONFIG_IBM_EMAC_MAL_CLR_ICINTSTAT 2408c2ecf20Sopenharmony_ci MAL_FTR_CLEAR_ICINTSTAT | 2418c2ecf20Sopenharmony_ci#endif 2428c2ecf20Sopenharmony_ci#ifdef CONFIG_IBM_EMAC_MAL_COMMON_ERR 2438c2ecf20Sopenharmony_ci MAL_FTR_COMMON_ERR_INT | 2448c2ecf20Sopenharmony_ci#endif 2458c2ecf20Sopenharmony_ci 0, 2468c2ecf20Sopenharmony_ci}; 2478c2ecf20Sopenharmony_ci 2488c2ecf20Sopenharmony_cistatic inline int mal_has_feature(struct mal_instance *dev, 2498c2ecf20Sopenharmony_ci unsigned long feature) 2508c2ecf20Sopenharmony_ci{ 2518c2ecf20Sopenharmony_ci return (MAL_FTRS_ALWAYS & feature) || 2528c2ecf20Sopenharmony_ci (MAL_FTRS_POSSIBLE & dev->features & feature); 2538c2ecf20Sopenharmony_ci} 2548c2ecf20Sopenharmony_ci 2558c2ecf20Sopenharmony_ci/* Register MAL devices */ 2568c2ecf20Sopenharmony_ciint mal_init(void); 2578c2ecf20Sopenharmony_civoid mal_exit(void); 2588c2ecf20Sopenharmony_ci 2598c2ecf20Sopenharmony_ciint mal_register_commac(struct mal_instance *mal, 2608c2ecf20Sopenharmony_ci struct mal_commac *commac); 2618c2ecf20Sopenharmony_civoid mal_unregister_commac(struct mal_instance *mal, 2628c2ecf20Sopenharmony_ci struct mal_commac *commac); 2638c2ecf20Sopenharmony_ciint mal_set_rcbs(struct mal_instance *mal, int channel, unsigned long size); 2648c2ecf20Sopenharmony_ci 2658c2ecf20Sopenharmony_ci/* Returns BD ring offset for a particular channel 2668c2ecf20Sopenharmony_ci (in 'struct mal_descriptor' elements) 2678c2ecf20Sopenharmony_ci*/ 2688c2ecf20Sopenharmony_ciint mal_tx_bd_offset(struct mal_instance *mal, int channel); 2698c2ecf20Sopenharmony_ciint mal_rx_bd_offset(struct mal_instance *mal, int channel); 2708c2ecf20Sopenharmony_ci 2718c2ecf20Sopenharmony_civoid mal_enable_tx_channel(struct mal_instance *mal, int channel); 2728c2ecf20Sopenharmony_civoid mal_disable_tx_channel(struct mal_instance *mal, int channel); 2738c2ecf20Sopenharmony_civoid mal_enable_rx_channel(struct mal_instance *mal, int channel); 2748c2ecf20Sopenharmony_civoid mal_disable_rx_channel(struct mal_instance *mal, int channel); 2758c2ecf20Sopenharmony_ci 2768c2ecf20Sopenharmony_civoid mal_poll_disable(struct mal_instance *mal, struct mal_commac *commac); 2778c2ecf20Sopenharmony_civoid mal_poll_enable(struct mal_instance *mal, struct mal_commac *commac); 2788c2ecf20Sopenharmony_ci 2798c2ecf20Sopenharmony_ci/* Add/remove EMAC to/from MAL polling list */ 2808c2ecf20Sopenharmony_civoid mal_poll_add(struct mal_instance *mal, struct mal_commac *commac); 2818c2ecf20Sopenharmony_civoid mal_poll_del(struct mal_instance *mal, struct mal_commac *commac); 2828c2ecf20Sopenharmony_ci 2838c2ecf20Sopenharmony_ci/* Ethtool MAL registers */ 2848c2ecf20Sopenharmony_cistruct mal_regs { 2858c2ecf20Sopenharmony_ci u32 tx_count; 2868c2ecf20Sopenharmony_ci u32 rx_count; 2878c2ecf20Sopenharmony_ci 2888c2ecf20Sopenharmony_ci u32 cfg; 2898c2ecf20Sopenharmony_ci u32 esr; 2908c2ecf20Sopenharmony_ci u32 ier; 2918c2ecf20Sopenharmony_ci u32 tx_casr; 2928c2ecf20Sopenharmony_ci u32 tx_carr; 2938c2ecf20Sopenharmony_ci u32 tx_eobisr; 2948c2ecf20Sopenharmony_ci u32 tx_deir; 2958c2ecf20Sopenharmony_ci u32 rx_casr; 2968c2ecf20Sopenharmony_ci u32 rx_carr; 2978c2ecf20Sopenharmony_ci u32 rx_eobisr; 2988c2ecf20Sopenharmony_ci u32 rx_deir; 2998c2ecf20Sopenharmony_ci u32 tx_ctpr[32]; 3008c2ecf20Sopenharmony_ci u32 rx_ctpr[32]; 3018c2ecf20Sopenharmony_ci u32 rcbs[32]; 3028c2ecf20Sopenharmony_ci}; 3038c2ecf20Sopenharmony_ci 3048c2ecf20Sopenharmony_ciint mal_get_regs_len(struct mal_instance *mal); 3058c2ecf20Sopenharmony_civoid *mal_dump_regs(struct mal_instance *mal, void *buf); 3068c2ecf20Sopenharmony_ci 3078c2ecf20Sopenharmony_ci#endif /* __IBM_NEWEMAC_MAL_H */ 308