Changeset cd089b9 in rtems-libbsd for rtemsbsd/powerpc/include


Ignore:
Timestamp:
05/05/17 06:47:39 (5 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
5, 5-freebsd-12, 6-freebsd-12, master
Children:
721b1c1
Parents:
28ee86a
git-author:
Sebastian Huber <sebastian.huber@…> (05/05/17 06:47:39)
git-committer:
Sebastian Huber <sebastian.huber@…> (10/23/17 07:23:59)
Message:

Linux update to 4.11-rc5

Linux baseline a71c9a1c779f2499fb2afc0553e543f18aff6edf (4.11-rc5).

Location:
rtemsbsd/powerpc/include
Files:
8 added
17 edited
1 moved

Legend:

Unmodified
Added
Removed
  • rtemsbsd/powerpc/include/asm/cache.h

    r28ee86a rcd089b9  
    3535#endif
    3636
     37#define L1_CACHE_BYTES PPC_DEFAULT_CACHE_LINE_SIZE
     38
    3739#endif /* __ASM_CACHE_H */
  • rtemsbsd/powerpc/include/linux/bitops.h

    r28ee86a rcd089b9  
    4646#define BIT_MASK(nr)            (1UL << ((nr) & (BITS_PER_LONG - 1)))
    4747#define BIT_WORD(nr)            ((nr) / BITS_PER_LONG)
    48 #define GENMASK(lo, hi)         (((2UL << ((hi) - (lo))) - 1UL) << (lo))
     48#define GENMASK(hi, lo)         (((2UL << ((hi) - (lo))) - 1UL) << (lo))
    4949#define BITS_PER_BYTE           8
    5050
  • rtemsbsd/powerpc/include/linux/compiler.h

    r28ee86a rcd089b9  
    6868
    6969#define uninitialized_var(x)            x = x
    70 #define __read_mostly __attribute__((__section__(".data.read_mostly")))
    7170#define __maybe_unused                  __unused
    7271#define __always_unused                 __unused
  • rtemsbsd/powerpc/include/linux/crc32.h

    r28ee86a rcd089b9  
    11/*
    2  * Copyright (c) 2016 embedded brains GmbH
     2 * Copyright (c) 2017 embedded brains GmbH
    33 * All rights reserved.
    44 *
     
    2525 */
    2626
    27 #ifndef _FDT_PHY
    28 #define _FDT_PHY
     27#ifndef _LINUX_CRC32_H
     28#define _LINUX_CRC32_H
     29
     30#include <linux/types.h>
     31#include <sys/libkern.h>
    2932
    3033#ifdef __cplusplus
     
    3235#endif /* __cplusplus */
    3336
    34 struct fdt_mdio_device {
    35         int (*read)(struct fdt_mdio_device *dev, int phy, int reg);
    36         int (*write)(struct fdt_mdio_device *dev, int phy, int reg, int val);
    37 };
     37static inline u32
     38crc32_le(u32 crc, unsigned char const *buf, size_t size)
     39{
    3840
    39 struct fdt_phy_device {
    40         int phy;
    41   struct fdt_mdio_device *mdio_dev;
    42 };
    43 
    44 struct fdt_phy_device *fdt_phy_obtain(int device_node);
    45 
    46 void fdt_phy_release(struct fdt_phy_device *phy_dev);
     41        return (crc32_raw(buf, size, crc));
     42}
    4743
    4844#ifdef __cplusplus
     
    5046#endif /* __cplusplus */
    5147
    52 #endif /* _FDT_PHY */
    53 
     48#endif /* _LINUX_CRC32_H */
  • rtemsbsd/powerpc/include/linux/device.h

    r28ee86a rcd089b9  
    4949typedef enum irqreturn  irqreturn_t;
    5050
    51 #include <stdio.h>
     51#include <sys/systm.h>
    5252
    5353#include <linux/ioport.h>
     
    8686    devm_kzalloc(dev, sizeof(type) * rtems_get_processor_count(), GFP_KERNEL)
    8787
     88#define dev_crit(dev, fmt, ...) \
     89    do { (void)dev; printf(fmt, ##__VA_ARGS__); } while (0)
     90
    8891#define dev_err(dev, fmt, ...) \
    89     do { (void)dev; fprintf(stderr, fmt, ##__VA_ARGS__); } while (0)
     92    do { (void)dev; printf(fmt, ##__VA_ARGS__); } while (0)
     93
     94#define dev_dbg(dev, fmt, ...) \
     95    do { (void)dev; printf(fmt, ##__VA_ARGS__); } while (0)
    9096
    9197#define dev_warn(dev, fmt, ...) \
    92     do { (void)dev; fprintf(stderr, fmt, ##__VA_ARGS__); } while (0)
     98    do { (void)dev; printf(fmt, ##__VA_ARGS__); } while (0)
    9399
    94100#define dev_info(dev, fmt, ...) \
    95     do { (void)dev; fprintf(stderr, fmt, ##__VA_ARGS__); } while (0)
     101    do { (void)dev; printf(fmt, ##__VA_ARGS__); } while (0)
    96102
    97103static inline struct device *
  • rtemsbsd/powerpc/include/linux/ioport.h

    r28ee86a rcd089b9  
    4242#define IORESOURCE_MEM  0x00000420
    4343
     44static inline resource_size_t
     45resource_size(const struct resource *res)
     46{
     47
     48        return (res->end - res->start + 1);
     49}
     50
    4451#ifdef __cplusplus
    4552}
  • rtemsbsd/powerpc/include/linux/list.h

    r28ee86a rcd089b9  
    7171#include <vm/vm_object.h>
    7272
    73 #define prefetch(x)
    74 
    7573struct list_head {
    7674        struct list_head *next;
  • rtemsbsd/powerpc/include/linux/netdevice.h

    r28ee86a rcd089b9  
    5151#define netdev_dbg(...) do { } while (0)
    5252
     53#define netif_msg_drv(p) 1
     54
    5355#ifdef __cplusplus
    5456}
  • rtemsbsd/powerpc/include/linux/of.h

    r28ee86a rcd089b9  
    11/*
    2  * Copyright (c) 2015 embedded brains GmbH
     2 * Copyright (c) 2015, 2017 embedded brains GmbH
    33 * All rights reserved.
    44 *
     
    2828#define _LINUX_OF_H
    2929
    30 #include <stdbool.h>
     30#include <linux/types.h>
    3131
    3232#include <libfdt.h>
     
    6060    int *len);
    6161
     62/* FIXME: If we need the property, then more work is to do */
     63#define of_find_property(dn, name, len) of_get_property(dn, name, len)
     64
     65int of_property_read_u32_array(const struct device_node *dn, const char *name,
     66    u32 *vals, size_t nz);
     67
     68static inline int
     69of_property_read_u32(const struct device_node *dn, const char *name, u32 *val)
     70{
     71
     72        return (of_property_read_u32_array(dn, name, val, 1));
     73}
     74
     75struct device_node *of_parse_phandle(struct device_node *dns,
     76    struct device_node *dn, const char *phandle_name, int index);
     77
     78int of_count_phandle_with_args(struct device_node *dn, const char *list_name,
     79    const char *cells_name);
     80
    6281bool of_device_is_available(const struct device_node *dn);
    6382
  • rtemsbsd/powerpc/include/linux/of_mdio.h

    r28ee86a rcd089b9  
     1/*
     2 * Copyright (c) 2017 embedded brains GmbH
     3 * All rights reserved.
     4 *
     5 * Redistribution and use in source and binary forms, with or without
     6 * modification, are permitted provided that the following conditions
     7 * are met:
     8 * 1. Redistributions of source code must retain the above copyright
     9 *    notice, this list of conditions and the following disclaimer.
     10 * 2. Redistributions in binary form must reproduce the above copyright
     11 *    notice, this list of conditions and the following disclaimer in the
     12 *    documentation and/or other materials provided with the distribution.
     13 *
     14 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
     15 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
     16 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
     17 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
     18 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
     19 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
     20 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
     21 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
     22 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
     23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
     24 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
     25 */
     26
     27#ifndef _LINUX_OF_MDIO_H
     28#define _LINUX_OF_MDIO_H
     29
     30#include <linux/of.h>
     31#include <linux/phy.h>
     32
     33#ifdef __cplusplus
     34extern "C" {
     35#endif /* __cplusplus */
     36
     37struct phy_device *of_phy_find_device(struct device_node *dn);
     38
     39#ifdef __cplusplus
     40}
     41#endif /* __cplusplus */
     42
     43#endif /* _LINUX_OF_MDIO_H */
  • rtemsbsd/powerpc/include/linux/of_net.h

    r28ee86a rcd089b9  
    3434#endif /* __cplusplus */
    3535
     36int of_get_phy_mode(struct device_node *dn);
     37
    3638const void *of_get_mac_address(struct device_node *dn);
    3739
  • rtemsbsd/powerpc/include/linux/percpu.h

    r28ee86a rcd089b9  
    2828#define _LINUX_PERCPU_H
    2929
     30#include <linux/cpumask.h>
    3031#include <linux/threads.h>
    3132
     
    4243    (_designator[_cpu])
    4344
    44 #define this_cpu_ptr(_ptr_designator) \
    45     (&(*_ptr_designator)[_CPU_SMP_Get_current_processor()])
     45#define this_cpu_ptr(_designator) \
     46    (&_designator[_CPU_SMP_Get_current_processor()])
    4647
    4748#define get_cpu_var(_designator) \
  • rtemsbsd/powerpc/include/linux/phy.h

    r28ee86a rcd089b9  
    11/*
    2  * Copyright (c) 2015 embedded brains GmbH
     2 * Copyright (c) 2015, 2017 embedded brains GmbH
    33 * All rights reserved.
    44 *
     
    2828#define _LINUX_PHY_H
    2929
     30#include <sys/queue.h>
     31#include <linux/device.h>
    3032#include <linux/list.h>
     33#include <linux/netdevice.h>
    3134
    3235#ifdef __cplusplus
     
    6770#define SPEED_100000 100000
    6871
     72#define SUPPORTED_10000baseT_Full       (1U << 0)
     73#define SUPPORTED_1000baseT_Full        (1U << 1)
     74#define SUPPORTED_100baseT_Full         (1U << 2)
     75#define SUPPORTED_100baseT_Half         (1U << 3)
     76#define SUPPORTED_10baseT_Full          (1U << 4)
     77#define SUPPORTED_10baseT_Half          (1U << 5)
     78#define SUPPORTED_Asym_Pause            (1U << 6)
     79#define SUPPORTED_Autoneg               (1U << 7)
     80#define SUPPORTED_MII                   (1U << 8)
     81#define SUPPORTED_Pause                 (1U << 9)
     82
     83struct mdio_bus {
     84        int (*read)(struct mdio_bus *bus, int phy, int reg);
     85        int (*write)(struct mdio_bus *bus, int phy, int reg, int val);
     86        SLIST_ENTRY(mdio_bus) next;
     87        int node;
     88};
     89
     90struct phy_device {
     91        struct {
     92                struct device dev;
     93                int addr;
     94                struct mdio_bus *bus;
     95        } mdio;
     96};
     97
     98static inline int
     99phy_read(struct phy_device *phy_dev, int reg)
     100{
     101        struct mdio_bus *mdio_dev;
     102
     103        mdio_dev = phy_dev->mdio.bus;
     104        return ((*mdio_dev->read)(mdio_dev, phy_dev->mdio.addr, (int)reg));
     105}
     106
     107static inline int
     108phy_write(struct phy_device *phy_dev, int reg, int val)
     109{
     110        struct mdio_bus *mdio_dev;
     111
     112        mdio_dev = phy_dev->mdio.bus;
     113        return ((*mdio_dev->write)(mdio_dev, phy_dev->mdio.addr, reg, val));
     114}
     115
    69116#ifdef __cplusplus
    70117}
  • rtemsbsd/powerpc/include/linux/platform_device.h

    r28ee86a rcd089b9  
    3939};
    4040
    41 struct resource *platform_get_resource_impl(struct platform_device *dev,
    42     unsigned int type, unsigned int num, struct resource *res);
     41struct resource *platform_get_resource(struct resource *res,
     42    struct platform_device *dev, unsigned int type, unsigned int num);
    4343
    44 #define platform_get_resource(dev, type, num) \
    45     platform_get_resource_impl(dev, type, num, &platform_resource)
     44int platform_get_irq(struct platform_device *dev, unsigned int num);
    4645
    4746#ifdef __cplusplus
  • rtemsbsd/powerpc/include/linux/slab.h

    r28ee86a rcd089b9  
    3434#include <sys/param.h>
    3535#include <sys/systm.h>
     36#include <sys/kernel.h>
    3637#include <sys/malloc.h>
    3738#include <vm/uma.h>
  • rtemsbsd/powerpc/include/linux/types.h

    r28ee86a rcd089b9  
    5959typedef uint64_t resource_size_t;
    6060
    61 typedef u64 phys_addr_t;
     61typedef uint64_t phys_addr_t;
    6262
    6363#define DECLARE_BITMAP(n, bits)                                         \
  • rtemsbsd/powerpc/include/linux/wait.h

    r28ee86a rcd089b9  
    9494} while (0)
    9595
     96#ifndef __rtems__
    9697#define wait_event_interruptible(q, cond)                               \
    9798({                                                                      \
     
    115116        -_error;                                                        \
    116117})
     118#else /* __rtems__ */
     119#define wait_event_interruptible(q, cond)                               \
     120({                                                                      \
     121        wait_event(q, cond);                                            \
     122        0;                                                              \
     123})
     124#endif /* __rtems__ */
    117125
    118126static inline int
  • rtemsbsd/powerpc/include/linux/workqueue.h

    r28ee86a rcd089b9  
    101101}
    102102
     103#define queue_work_on(cpu, q, work) queue_work(q, work)
     104
    103105static inline void
    104106_delayed_work_fn(void *arg)
Note: See TracChangeset for help on using the changeset viewer.