1 /***********************license start***************
2 * Copyright (c) 2008 Cavium Networks (support@cavium.com). All rights
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions are
10 * * Redistributions of source code must retain the above copyright
11 * notice, this list of conditions and the following disclaimer.
13 * * Redistributions in binary form must reproduce the above
14 * copyright notice, this list of conditions and the following
15 * disclaimer in the documentation and/or other materials provided
16 * with the distribution.
18 * * Neither the name of Cavium Networks nor the names of
19 * its contributors may be used to endorse or promote products
20 * derived from this software without specific prior written
23 * TO THE MAXIMUM EXTENT PERMITTED BY LAW, THE SOFTWARE IS PROVIDED "AS IS"
24 * AND WITH ALL FAULTS AND CAVIUM NETWORKS MAKES NO PROMISES, REPRESENTATIONS
25 * OR WARRANTIES, EITHER EXPRESS, IMPLIED, STATUTORY, OR OTHERWISE, WITH
26 * RESPECT TO THE SOFTWARE, INCLUDING ITS CONDITION, ITS CONFORMITY TO ANY
27 * REPRESENTATION OR DESCRIPTION, OR THE EXISTENCE OF ANY LATENT OR PATENT
28 * DEFECTS, AND CAVIUM SPECIFICALLY DISCLAIMS ALL IMPLIED (IF ANY) WARRANTIES
29 * OF TITLE, MERCHANTABILITY, NONINFRINGEMENT, FITNESS FOR A PARTICULAR
30 * PURPOSE, LACK OF VIRUSES, ACCURACY OR COMPLETENESS, QUIET ENJOYMENT, QUIET
31 * POSSESSION OR CORRESPONDENCE TO DESCRIPTION. THE ENTIRE RISK ARISING OUT
32 * OF USE OR PERFORMANCE OF THE SOFTWARE LIES WITH YOU.
35 * For any questions regarding licensing please contact marketing@caviumnetworks.com
37 ***********************license end**************************************/
41 #ifndef __CVMX_COMPACTFLASH_H__
42 #define __CVMX_COMPACTFLASH_H__
49 * This function takes values from the compact flash device
50 * identify response, and returns the appropriate value to write
51 * into the boot bus DMA timing register.
53 * @param tim_mult Eclock timing multiple to use
54 * @param ident_data Data returned by the 'identify' command. This is used to
55 * determine the DMA modes supported by the card, if any.
56 * @param mwdma_mode_ptr
57 * Optional pointer to return MWDMA mode in
59 * @return 64 bit value to write to DMA timing register
61 extern uint64_t cvmx_compactflash_generate_dma_tim(int tim_mult, uint16_t *ident_data, int *mwdma_mode_ptr);
64 * Setup timing and region config to support a specific IDE PIO
65 * mode over the bootbus.
67 * @param cs0 Bootbus region number connected to CS0 on the IDE device
68 * @param cs1 Bootbus region number connected to CS1 on the IDE device
69 * @param pio_mode PIO mode to set (0-6)
71 extern void cvmx_compactflash_set_piomode(int cs0, int cs1, int pio_mode);
76 #endif /* __CVMX_COMPACTFLASH_H__ */